mirror of
https://github.com/esphome/esphome.git
synced 2024-12-01 03:04:12 +01:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
066c42d629
794 changed files with 7619 additions and 16229 deletions
16
.github/actions/build-image/action.yaml
vendored
16
.github/actions/build-image/action.yaml
vendored
|
@ -57,14 +57,6 @@ runs:
|
||||||
digest="${{ steps.build-ghcr.outputs.digest }}"
|
digest="${{ steps.build-ghcr.outputs.digest }}"
|
||||||
touch "/tmp/digests/${{ inputs.target }}/ghcr/${digest#sha256:}"
|
touch "/tmp/digests/${{ inputs.target }}/ghcr/${digest#sha256:}"
|
||||||
|
|
||||||
- name: Upload ghcr digest
|
|
||||||
uses: actions/upload-artifact@v3.1.3
|
|
||||||
with:
|
|
||||||
name: digests-${{ inputs.target }}-ghcr
|
|
||||||
path: /tmp/digests/${{ inputs.target }}/ghcr/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
- name: Build and push to dockerhub by digest
|
- name: Build and push to dockerhub by digest
|
||||||
id: build-dockerhub
|
id: build-dockerhub
|
||||||
uses: docker/build-push-action@v5.3.0
|
uses: docker/build-push-action@v5.3.0
|
||||||
|
@ -87,11 +79,3 @@ runs:
|
||||||
mkdir -p /tmp/digests/${{ inputs.target }}/dockerhub
|
mkdir -p /tmp/digests/${{ inputs.target }}/dockerhub
|
||||||
digest="${{ steps.build-dockerhub.outputs.digest }}"
|
digest="${{ steps.build-dockerhub.outputs.digest }}"
|
||||||
touch "/tmp/digests/${{ inputs.target }}/dockerhub/${digest#sha256:}"
|
touch "/tmp/digests/${{ inputs.target }}/dockerhub/${digest#sha256:}"
|
||||||
|
|
||||||
- name: Upload dockerhub digest
|
|
||||||
uses: actions/upload-artifact@v3.1.3
|
|
||||||
with:
|
|
||||||
name: digests-${{ inputs.target }}-dockerhub
|
|
||||||
path: /tmp/digests/${{ inputs.target }}/dockerhub/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
|
@ -132,6 +132,13 @@ jobs:
|
||||||
suffix: lint
|
suffix: lint
|
||||||
version: ${{ needs.init.outputs.tag }}
|
version: ${{ needs.init.outputs.tag }}
|
||||||
|
|
||||||
|
- name: Upload digests
|
||||||
|
uses: actions/upload-artifact@v4.3.3
|
||||||
|
with:
|
||||||
|
name: digests-${{ matrix.platform }}
|
||||||
|
path: /tmp/digests
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
deploy-manifest:
|
deploy-manifest:
|
||||||
name: Publish ESPHome ${{ matrix.image.title }} to ${{ matrix.registry }}
|
name: Publish ESPHome ${{ matrix.image.title }} to ${{ matrix.registry }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -160,11 +167,14 @@ jobs:
|
||||||
- dockerhub
|
- dockerhub
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.1.5
|
- uses: actions/checkout@v4.1.5
|
||||||
|
|
||||||
- name: Download digests
|
- name: Download digests
|
||||||
uses: actions/download-artifact@v3.0.2
|
uses: actions/download-artifact@v4.1.7
|
||||||
with:
|
with:
|
||||||
name: digests-${{ matrix.image.target }}-${{ matrix.registry }}
|
pattern: digests-*
|
||||||
path: /tmp/digests
|
path: /tmp/digests
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.3.0
|
uses: docker/setup-buildx-action@v3.3.0
|
||||||
|
|
||||||
|
@ -195,7 +205,7 @@ jobs:
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Create manifest list and push
|
- name: Create manifest list and push
|
||||||
working-directory: /tmp/digests
|
working-directory: /tmp/digests/${{ matrix.image.target }}/${{ matrix.registry }}
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create $(jq -Rcnr 'inputs | . / "," | map("-t " + .) | join(" ")' <<< "${{ steps.tags.outputs.tags}}") \
|
docker buildx imagetools create $(jq -Rcnr 'inputs | . / "," | map("-t " + .) | join(" ")' <<< "${{ steps.tags.outputs.tags}}") \
|
||||||
$(printf '${{ steps.tags.outputs.image }}@sha256:%s ' *)
|
$(printf '${{ steps.tags.outputs.image }}@sha256:%s ' *)
|
||||||
|
|
|
@ -54,7 +54,6 @@ FAST_FILTER = {
|
||||||
"LSB10": 7,
|
"LSB10": 7,
|
||||||
}
|
}
|
||||||
|
|
||||||
CONF_ANGLE = "angle"
|
|
||||||
CONF_RAW_ANGLE = "raw_angle"
|
CONF_RAW_ANGLE = "raw_angle"
|
||||||
CONF_RAW_POSITION = "raw_position"
|
CONF_RAW_POSITION = "raw_position"
|
||||||
CONF_WATCHDOG = "watchdog"
|
CONF_WATCHDOG = "watchdog"
|
||||||
|
|
|
@ -11,6 +11,7 @@ from esphome.const import (
|
||||||
CONF_MAGNITUDE,
|
CONF_MAGNITUDE,
|
||||||
CONF_STATUS,
|
CONF_STATUS,
|
||||||
CONF_POSITION,
|
CONF_POSITION,
|
||||||
|
CONF_ANGLE,
|
||||||
)
|
)
|
||||||
from .. import as5600_ns, AS5600Component
|
from .. import as5600_ns, AS5600Component
|
||||||
|
|
||||||
|
@ -19,7 +20,6 @@ DEPENDENCIES = ["as5600"]
|
||||||
|
|
||||||
AS5600Sensor = as5600_ns.class_("AS5600Sensor", sensor.Sensor, cg.PollingComponent)
|
AS5600Sensor = as5600_ns.class_("AS5600Sensor", sensor.Sensor, cg.PollingComponent)
|
||||||
|
|
||||||
CONF_ANGLE = "angle"
|
|
||||||
CONF_RAW_ANGLE = "raw_angle"
|
CONF_RAW_ANGLE = "raw_angle"
|
||||||
CONF_RAW_POSITION = "raw_position"
|
CONF_RAW_POSITION = "raw_position"
|
||||||
CONF_WATCHDOG = "watchdog"
|
CONF_WATCHDOG = "watchdog"
|
||||||
|
|
|
@ -23,7 +23,6 @@ CODEOWNERS = ["@numo68"]
|
||||||
|
|
||||||
display_menu_base_ns = cg.esphome_ns.namespace("display_menu_base")
|
display_menu_base_ns = cg.esphome_ns.namespace("display_menu_base")
|
||||||
|
|
||||||
CONF_DISPLAY_ID = "display_id"
|
|
||||||
|
|
||||||
CONF_ROTARY = "rotary"
|
CONF_ROTARY = "rotary"
|
||||||
CONF_JOYSTICK = "joystick"
|
CONF_JOYSTICK = "joystick"
|
||||||
|
|
|
@ -3,6 +3,7 @@ import esphome.config_validation as cv
|
||||||
from esphome.const import (
|
from esphome.const import (
|
||||||
CONF_ID,
|
CONF_ID,
|
||||||
CONF_DIMENSIONS,
|
CONF_DIMENSIONS,
|
||||||
|
CONF_DISPLAY_ID,
|
||||||
)
|
)
|
||||||
from esphome.core.entity_helpers import inherit_property_from
|
from esphome.core.entity_helpers import inherit_property_from
|
||||||
from esphome.components import lcd_base
|
from esphome.components import lcd_base
|
||||||
|
@ -18,8 +19,6 @@ AUTO_LOAD = ["display_menu_base"]
|
||||||
|
|
||||||
lcd_menu_ns = cg.esphome_ns.namespace("lcd_menu")
|
lcd_menu_ns = cg.esphome_ns.namespace("lcd_menu")
|
||||||
|
|
||||||
CONF_DISPLAY_ID = "display_id"
|
|
||||||
|
|
||||||
CONF_MARK_SELECTED = "mark_selected"
|
CONF_MARK_SELECTED = "mark_selected"
|
||||||
CONF_MARK_EDITING = "mark_editing"
|
CONF_MARK_EDITING = "mark_editing"
|
||||||
CONF_MARK_SUBMENU = "mark_submenu"
|
CONF_MARK_SUBMENU = "mark_submenu"
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.components import binary_sensor
|
from esphome.components import binary_sensor
|
||||||
from esphome.const import CONF_ID, CONF_KEY
|
from esphome.const import CONF_ID, CONF_KEY, CONF_ROW, CONF_COL
|
||||||
from .. import MatrixKeypad, matrix_keypad_ns, CONF_KEYPAD_ID
|
from .. import MatrixKeypad, matrix_keypad_ns, CONF_KEYPAD_ID
|
||||||
|
|
||||||
CONF_ROW = "row"
|
|
||||||
CONF_COL = "col"
|
|
||||||
|
|
||||||
DEPENDENCIES = ["matrix_keypad"]
|
DEPENDENCIES = ["matrix_keypad"]
|
||||||
|
|
||||||
MatrixKeypadBinarySensor = matrix_keypad_ns.class_(
|
MatrixKeypadBinarySensor = matrix_keypad_ns.class_(
|
||||||
|
|
|
@ -3,7 +3,13 @@ import esphome.config_validation as cv
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
|
|
||||||
from esphome.automation import maybe_simple_id
|
from esphome.automation import maybe_simple_id
|
||||||
from esphome.const import CONF_ID, CONF_ON_STATE, CONF_TRIGGER_ID, CONF_VOLUME
|
from esphome.const import (
|
||||||
|
CONF_ID,
|
||||||
|
CONF_ON_STATE,
|
||||||
|
CONF_TRIGGER_ID,
|
||||||
|
CONF_VOLUME,
|
||||||
|
CONF_ON_IDLE,
|
||||||
|
)
|
||||||
from esphome.core import CORE
|
from esphome.core import CORE
|
||||||
from esphome.coroutine import coroutine_with_priority
|
from esphome.coroutine import coroutine_with_priority
|
||||||
from esphome.cpp_helpers import setup_entity
|
from esphome.cpp_helpers import setup_entity
|
||||||
|
@ -43,7 +49,6 @@ VolumeSetAction = media_player_ns.class_(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
CONF_ON_IDLE = "on_idle"
|
|
||||||
CONF_ON_PLAY = "on_play"
|
CONF_ON_PLAY = "on_play"
|
||||||
CONF_ON_PAUSE = "on_pause"
|
CONF_ON_PAUSE = "on_pause"
|
||||||
CONF_MEDIA_URL = "media_url"
|
CONF_MEDIA_URL = "media_url"
|
||||||
|
|
61
esphome/components/pulse_meter/pulse_filter.md
Normal file
61
esphome/components/pulse_meter/pulse_filter.md
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
# PULSE Filter
|
||||||
|
|
||||||
|
The PULSE filter filters noisy pulses by ensuring that the pulse is in a steady state for at least `filter_length` before allowing the state change to occur.
|
||||||
|
It counts the pulse time from the rising edge that stayed high for at least `filter_length`, so noise before this won't be considered the start of a pulse.
|
||||||
|
It then must see a low pulse that is at least `filter_length` long before a subsequent rising edge is considered a new pulse start.
|
||||||
|
|
||||||
|
It's operation should be the same as delayed_on_off from the Binary Sensor component.
|
||||||
|
|
||||||
|
There are three moving parts in the algorithm that are used to determine the state of the filter.
|
||||||
|
|
||||||
|
1. The time between interrupts, measured from the last interrupt, this is compared to filter_length to determine if the pulse has been in a steady state for long enough.
|
||||||
|
2. A latch variable that is set true when a high pulse is long enough to be considered a valid pulse and is reset when a low pulse is long enough to allow for another pulse to begin.
|
||||||
|
3. The previous and current state of the pin used to determine if the pulse is rising or falling.
|
||||||
|
|
||||||
|
## Ghost interrupts
|
||||||
|
|
||||||
|
Observations from the devices show that even though the interrupt should trigger on every rising or falling edge, sometimes interrupts show the same state twice in a row.
|
||||||
|
The current theory is an interprets occurs, but then the pin changing back faster than the ISR can be called and read the value, meaning it sees the same state twice in a row.
|
||||||
|
The algorithm interprets these when it sees them as two edges in a row, so will potentially reset a pulse if
|
||||||
|
|
||||||
|
## Pulse Filter Truth table
|
||||||
|
|
||||||
|
The following is all of the possible states of the filter along with the new inputs.
|
||||||
|
It also shows a diagram of a possible series of interrupts that would cause the filter to enter that state.
|
||||||
|
It then has the action that the filter should take and a description of what is happening.
|
||||||
|
|
||||||
|
Diagram legend
|
||||||
|
|
||||||
|
- `/` rising edge
|
||||||
|
- `\` falling edge
|
||||||
|
- `‾` high steady state of at least `filter_length`
|
||||||
|
- `_` low steady state of at least `filter_length`
|
||||||
|
- `¦` ghost interrupt
|
||||||
|
|
||||||
|
| Length | Latch | From | To | Diagram | Action | Description |
|
||||||
|
| ------ | ----- | ---- | --- | ------- | ------------------ | ---------------------------------------------------------------------------------------------------- |
|
||||||
|
| T | 1 | 0 | 0 | `‾\_¦ ` | Reset | `filter_length` low, reset the latch |
|
||||||
|
| T | 1 | 0 | 1 | `‾\_/ ` | Reset, Rising Edge | `filter_length` low, reset the latch, rising edge could be a new pulse |
|
||||||
|
| T | 1 | 1 | 0 | `‾\/‾\` | - | Already latched from a previous `filter_length` high |
|
||||||
|
| T | 1 | 1 | 1 | `‾\/‾¦` | - | Already latched from a previous `filter_length` high |
|
||||||
|
| T | 0 | 1 | 1 | `_/‾¦` | Set and Publish | `filter_length` high, set the latch and publish the pulse |
|
||||||
|
| T | 0 | 1 | 0 | `_/‾\ ` | Set and Publish | `filter_length` high, set the latch and publish the pulse |
|
||||||
|
| T | 0 | 0 | 1 | `_/\_/` | Rising Edge | Already unlatched from a previous `filter_length` low |
|
||||||
|
| T | 0 | 0 | 0 | `_/\_¦` | - | Already unlatched from a previous `filter_length` low |
|
||||||
|
| F | 1 | 0 | 0 | `‾\¦ ` | - | Low was not long enough to reset the latch |
|
||||||
|
| F | 1 | 0 | 1 | `‾\/ ` | - | Low was not long enough to reset the latch |
|
||||||
|
| F | 1 | 1 | 0 | `‾\/\ ` | - | Low was not long enough to reset the latch |
|
||||||
|
| F | 1 | 1 | 1 | `‾¦ ` | - | Ghost of 0 length definitely was not long was not long enough to reset the latch |
|
||||||
|
| F | 0 | 1 | 1 | `_/¦ ` | Rising Edge | High was not long enough to set the latch, but the second half of the ghost can be a new rising edge |
|
||||||
|
| F | 0 | 1 | 0 | `_/\ ` | - | High was not long enough to set the latch |
|
||||||
|
| F | 0 | 0 | 1 | `_/\/ ` | Rising Edge | High was not long enough to set the latch, but this may be a rising edge |
|
||||||
|
| F | 0 | 0 | 0 | `_¦ ` | - | Ghost of 0 length definitely was not long was not long enough to set the latch |
|
||||||
|
|
||||||
|
## Startup
|
||||||
|
|
||||||
|
On startup the filter should not consider whatever state it is in as valid so it does not count a strange pulse.
|
||||||
|
There are two possible starting configurations, either the pin is high or the pin is low.
|
||||||
|
If the pin is high, the subsequent falling edge should not count as a pulse as we never saw the rising edge.
|
||||||
|
Therefore we start in the latched state.
|
||||||
|
If the pin is low, the subsequent rising edge can be counted as the first pulse.
|
||||||
|
Therefore we start in the unlatched state.
|
|
@ -24,11 +24,16 @@ void PulseMeterSensor::setup() {
|
||||||
if (this->filter_mode_ == FILTER_EDGE) {
|
if (this->filter_mode_ == FILTER_EDGE) {
|
||||||
this->pin_->attach_interrupt(PulseMeterSensor::edge_intr, this, gpio::INTERRUPT_RISING_EDGE);
|
this->pin_->attach_interrupt(PulseMeterSensor::edge_intr, this, gpio::INTERRUPT_RISING_EDGE);
|
||||||
} else if (this->filter_mode_ == FILTER_PULSE) {
|
} else if (this->filter_mode_ == FILTER_PULSE) {
|
||||||
|
// Set the pin value to the current value to avoid a false edge
|
||||||
|
this->pulse_state_.last_pin_val_ = this->isr_pin_.digital_read();
|
||||||
|
this->pulse_state_.latched_ = this->pulse_state_.last_pin_val_;
|
||||||
this->pin_->attach_interrupt(PulseMeterSensor::pulse_intr, this, gpio::INTERRUPT_ANY_EDGE);
|
this->pin_->attach_interrupt(PulseMeterSensor::pulse_intr, this, gpio::INTERRUPT_ANY_EDGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PulseMeterSensor::loop() {
|
void PulseMeterSensor::loop() {
|
||||||
|
const uint32_t now = micros();
|
||||||
|
|
||||||
// Reset the count in get before we pass it back to the ISR as set
|
// Reset the count in get before we pass it back to the ISR as set
|
||||||
this->get_->count_ = 0;
|
this->get_->count_ = 0;
|
||||||
|
|
||||||
|
@ -38,6 +43,20 @@ void PulseMeterSensor::loop() {
|
||||||
this->set_ = this->get_;
|
this->set_ = this->get_;
|
||||||
this->get_ = temp;
|
this->get_ = temp;
|
||||||
|
|
||||||
|
// If an edge was peeked, repay the debt
|
||||||
|
if (this->peeked_edge_ && this->get_->count_ > 0) {
|
||||||
|
this->peeked_edge_ = false;
|
||||||
|
this->get_->count_--;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there is an unprocessed edge, and filter_us_ has passed since, count this edge early
|
||||||
|
if (this->get_->last_rising_edge_us_ != this->get_->last_detected_edge_us_ &&
|
||||||
|
now - this->get_->last_rising_edge_us_ >= this->filter_us_) {
|
||||||
|
this->peeked_edge_ = true;
|
||||||
|
this->get_->last_detected_edge_us_ = this->get_->last_rising_edge_us_;
|
||||||
|
this->get_->count_++;
|
||||||
|
}
|
||||||
|
|
||||||
// Check if we detected a pulse this loop
|
// Check if we detected a pulse this loop
|
||||||
if (this->get_->count_ > 0) {
|
if (this->get_->count_ > 0) {
|
||||||
// Keep a running total of pulses if a total sensor is configured
|
// Keep a running total of pulses if a total sensor is configured
|
||||||
|
@ -64,7 +83,6 @@ void PulseMeterSensor::loop() {
|
||||||
}
|
}
|
||||||
// No detected edges this loop
|
// No detected edges this loop
|
||||||
else {
|
else {
|
||||||
const uint32_t now = micros();
|
|
||||||
const uint32_t time_since_valid_edge_us = now - this->last_processed_edge_us_;
|
const uint32_t time_since_valid_edge_us = now - this->last_processed_edge_us_;
|
||||||
|
|
||||||
switch (this->meter_state_) {
|
switch (this->meter_state_) {
|
||||||
|
@ -102,11 +120,14 @@ void IRAM_ATTR PulseMeterSensor::edge_intr(PulseMeterSensor *sensor) {
|
||||||
// This is an interrupt handler - we can't call any virtual method from this method
|
// This is an interrupt handler - we can't call any virtual method from this method
|
||||||
// Get the current time before we do anything else so the measurements are consistent
|
// Get the current time before we do anything else so the measurements are consistent
|
||||||
const uint32_t now = micros();
|
const uint32_t now = micros();
|
||||||
|
auto &state = sensor->edge_state_;
|
||||||
|
auto &set = *sensor->set_;
|
||||||
|
|
||||||
if ((now - sensor->last_edge_candidate_us_) >= sensor->filter_us_) {
|
if ((now - state.last_sent_edge_us_) >= sensor->filter_us_) {
|
||||||
sensor->last_edge_candidate_us_ = now;
|
state.last_sent_edge_us_ = now;
|
||||||
sensor->set_->last_detected_edge_us_ = now;
|
set.last_detected_edge_us_ = now;
|
||||||
sensor->set_->count_++;
|
set.last_rising_edge_us_ = now;
|
||||||
|
set.count_++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,33 +136,27 @@ void IRAM_ATTR PulseMeterSensor::pulse_intr(PulseMeterSensor *sensor) {
|
||||||
// Get the current time before we do anything else so the measurements are consistent
|
// Get the current time before we do anything else so the measurements are consistent
|
||||||
const uint32_t now = micros();
|
const uint32_t now = micros();
|
||||||
const bool pin_val = sensor->isr_pin_.digital_read();
|
const bool pin_val = sensor->isr_pin_.digital_read();
|
||||||
|
auto &state = sensor->pulse_state_;
|
||||||
|
auto &set = *sensor->set_;
|
||||||
|
|
||||||
// A pulse occurred faster than we can detect
|
// Filter length has passed since the last interrupt
|
||||||
if (sensor->last_pin_val_ == pin_val) {
|
const bool length = now - state.last_intr_ >= sensor->filter_us_;
|
||||||
// If we haven't reached the filter length yet we need to reset our last_intr_ to now
|
|
||||||
// otherwise we can consider this noise as the "pulse" was certainly less than filter_us_
|
if (length && state.latched_ && !state.last_pin_val_) { // Long enough low edge
|
||||||
if (now - sensor->last_intr_ < sensor->filter_us_) {
|
state.latched_ = false;
|
||||||
sensor->last_intr_ = now;
|
} else if (length && !state.latched_ && state.last_pin_val_) { // Long enough high edge
|
||||||
}
|
state.latched_ = true;
|
||||||
} else {
|
set.last_detected_edge_us_ = state.last_intr_;
|
||||||
// Check if the last interrupt was long enough in the past
|
set.count_++;
|
||||||
if (now - sensor->last_intr_ > sensor->filter_us_) {
|
|
||||||
// High pulse of filter length now falling (therefore last_intr_ was the rising edge)
|
|
||||||
if (!sensor->in_pulse_ && sensor->last_pin_val_) {
|
|
||||||
sensor->last_edge_candidate_us_ = sensor->last_intr_;
|
|
||||||
sensor->in_pulse_ = true;
|
|
||||||
}
|
|
||||||
// Low pulse of filter length now rising (therefore last_intr_ was the falling edge)
|
|
||||||
else if (sensor->in_pulse_ && !sensor->last_pin_val_) {
|
|
||||||
sensor->set_->last_detected_edge_us_ = sensor->last_edge_candidate_us_;
|
|
||||||
sensor->set_->count_++;
|
|
||||||
sensor->in_pulse_ = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sensor->last_intr_ = now;
|
// Due to order of operations this includes
|
||||||
sensor->last_pin_val_ = pin_val;
|
// length && latched && rising (just reset from a long low edge)
|
||||||
}
|
// !latched && (rising || high) (noise on the line resetting the potential rising edge)
|
||||||
|
set.last_rising_edge_us_ = !state.latched_ && pin_val ? now : set.last_detected_edge_us_;
|
||||||
|
|
||||||
|
state.last_intr_ = now;
|
||||||
|
state.last_pin_val_ = pin_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace pulse_meter
|
} // namespace pulse_meter
|
||||||
|
|
|
@ -43,6 +43,7 @@ class PulseMeterSensor : public sensor::Sensor, public Component {
|
||||||
// Variables used in the loop
|
// Variables used in the loop
|
||||||
enum class MeterState { INITIAL, RUNNING, TIMED_OUT };
|
enum class MeterState { INITIAL, RUNNING, TIMED_OUT };
|
||||||
MeterState meter_state_ = MeterState::INITIAL;
|
MeterState meter_state_ = MeterState::INITIAL;
|
||||||
|
bool peeked_edge_ = false;
|
||||||
uint32_t total_pulses_ = 0;
|
uint32_t total_pulses_ = 0;
|
||||||
uint32_t last_processed_edge_us_ = 0;
|
uint32_t last_processed_edge_us_ = 0;
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ class PulseMeterSensor : public sensor::Sensor, public Component {
|
||||||
// (except for resetting the values)
|
// (except for resetting the values)
|
||||||
struct State {
|
struct State {
|
||||||
uint32_t last_detected_edge_us_ = 0;
|
uint32_t last_detected_edge_us_ = 0;
|
||||||
|
uint32_t last_rising_edge_us_ = 0;
|
||||||
uint32_t count_ = 0;
|
uint32_t count_ = 0;
|
||||||
};
|
};
|
||||||
State state_[2];
|
State state_[2];
|
||||||
|
@ -61,11 +63,21 @@ class PulseMeterSensor : public sensor::Sensor, public Component {
|
||||||
|
|
||||||
// Only use these variables in the ISR
|
// Only use these variables in the ISR
|
||||||
ISRInternalGPIOPin isr_pin_;
|
ISRInternalGPIOPin isr_pin_;
|
||||||
uint32_t last_edge_candidate_us_ = 0;
|
|
||||||
|
/// Filter state for edge mode
|
||||||
|
struct EdgeState {
|
||||||
|
uint32_t last_sent_edge_us_ = 0;
|
||||||
|
};
|
||||||
|
EdgeState edge_state_{};
|
||||||
|
|
||||||
|
/// Filter state for pulse mode
|
||||||
|
struct PulseState {
|
||||||
uint32_t last_intr_ = 0;
|
uint32_t last_intr_ = 0;
|
||||||
bool in_pulse_ = false;
|
bool latched_ = false;
|
||||||
bool last_pin_val_ = false;
|
bool last_pin_val_ = false;
|
||||||
};
|
};
|
||||||
|
PulseState pulse_state_{};
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace pulse_meter
|
} // namespace pulse_meter
|
||||||
} // namespace esphome
|
} // namespace esphome
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
import esphome.codegen as cg
|
import esphome.codegen as cg
|
||||||
import esphome.config_validation as cv
|
import esphome.config_validation as cv
|
||||||
from esphome.components import binary_sensor
|
from esphome.components import binary_sensor
|
||||||
|
from esphome.const import CONF_ROW, CONF_COL
|
||||||
|
|
||||||
from .. import SX1509Component, sx1509_ns, CONF_SX1509_ID
|
from .. import SX1509Component, sx1509_ns, CONF_SX1509_ID
|
||||||
|
|
||||||
CONF_ROW = "row"
|
|
||||||
CONF_COL = "col"
|
|
||||||
|
|
||||||
DEPENDENCIES = ["sx1509"]
|
DEPENDENCIES = ["sx1509"]
|
||||||
|
|
||||||
SX1509BinarySensor = sx1509_ns.class_("SX1509BinarySensor", binary_sensor.BinarySensor)
|
SX1509BinarySensor = sx1509_ns.class_("SX1509BinarySensor", binary_sensor.BinarySensor)
|
||||||
|
|
|
@ -8,6 +8,7 @@ from esphome.const import (
|
||||||
CONF_MEDIA_PLAYER,
|
CONF_MEDIA_PLAYER,
|
||||||
CONF_ON_CLIENT_CONNECTED,
|
CONF_ON_CLIENT_CONNECTED,
|
||||||
CONF_ON_CLIENT_DISCONNECTED,
|
CONF_ON_CLIENT_DISCONNECTED,
|
||||||
|
CONF_ON_IDLE,
|
||||||
)
|
)
|
||||||
from esphome import automation
|
from esphome import automation
|
||||||
from esphome.automation import register_action, register_condition
|
from esphome.automation import register_action, register_condition
|
||||||
|
@ -32,7 +33,6 @@ CONF_ON_TTS_START = "on_tts_start"
|
||||||
CONF_ON_TTS_STREAM_START = "on_tts_stream_start"
|
CONF_ON_TTS_STREAM_START = "on_tts_stream_start"
|
||||||
CONF_ON_TTS_STREAM_END = "on_tts_stream_end"
|
CONF_ON_TTS_STREAM_END = "on_tts_stream_end"
|
||||||
CONF_ON_WAKE_WORD_DETECTED = "on_wake_word_detected"
|
CONF_ON_WAKE_WORD_DETECTED = "on_wake_word_detected"
|
||||||
CONF_ON_IDLE = "on_idle"
|
|
||||||
|
|
||||||
CONF_SILENCE_DETECTION = "silence_detection"
|
CONF_SILENCE_DETECTION = "silence_detection"
|
||||||
CONF_USE_WAKE_WORD = "use_wake_word"
|
CONF_USE_WAKE_WORD = "use_wake_word"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
"""Constants used by esphome."""
|
"""Constants used by esphome."""
|
||||||
|
|
||||||
__version__ = "2024.5.0-dev"
|
__version__ = "2024.6.0-dev"
|
||||||
|
|
||||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||||
|
@ -51,6 +51,7 @@ CONF_ALPHA = "alpha"
|
||||||
CONF_ALTITUDE = "altitude"
|
CONF_ALTITUDE = "altitude"
|
||||||
CONF_ANALOG = "analog"
|
CONF_ANALOG = "analog"
|
||||||
CONF_AND = "and"
|
CONF_AND = "and"
|
||||||
|
CONF_ANGLE = "angle"
|
||||||
CONF_AP = "ap"
|
CONF_AP = "ap"
|
||||||
CONF_APPARENT_POWER = "apparent_power"
|
CONF_APPARENT_POWER = "apparent_power"
|
||||||
CONF_ARDUINO_VERSION = "arduino_version"
|
CONF_ARDUINO_VERSION = "arduino_version"
|
||||||
|
@ -124,6 +125,7 @@ CONF_CLOSE_DURATION = "close_duration"
|
||||||
CONF_CLOSE_ENDSTOP = "close_endstop"
|
CONF_CLOSE_ENDSTOP = "close_endstop"
|
||||||
CONF_CO2 = "co2"
|
CONF_CO2 = "co2"
|
||||||
CONF_CODE = "code"
|
CONF_CODE = "code"
|
||||||
|
CONF_COL = "col"
|
||||||
CONF_COLD_WHITE = "cold_white"
|
CONF_COLD_WHITE = "cold_white"
|
||||||
CONF_COLD_WHITE_COLOR_TEMPERATURE = "cold_white_color_temperature"
|
CONF_COLD_WHITE_COLOR_TEMPERATURE = "cold_white_color_temperature"
|
||||||
CONF_COLOR = "color"
|
CONF_COLOR = "color"
|
||||||
|
@ -218,6 +220,7 @@ CONF_DISCOVERY_PREFIX = "discovery_prefix"
|
||||||
CONF_DISCOVERY_RETAIN = "discovery_retain"
|
CONF_DISCOVERY_RETAIN = "discovery_retain"
|
||||||
CONF_DISCOVERY_UNIQUE_ID_GENERATOR = "discovery_unique_id_generator"
|
CONF_DISCOVERY_UNIQUE_ID_GENERATOR = "discovery_unique_id_generator"
|
||||||
CONF_DISPLAY = "display"
|
CONF_DISPLAY = "display"
|
||||||
|
CONF_DISPLAY_ID = "display_id"
|
||||||
CONF_DISTANCE = "distance"
|
CONF_DISTANCE = "distance"
|
||||||
CONF_DITHER = "dither"
|
CONF_DITHER = "dither"
|
||||||
CONF_DIV_RATIO = "div_ratio"
|
CONF_DIV_RATIO = "div_ratio"
|
||||||
|
@ -539,6 +542,7 @@ CONF_ON_FINGER_SCAN_MISPLACED = "on_finger_scan_misplaced"
|
||||||
CONF_ON_FINGER_SCAN_START = "on_finger_scan_start"
|
CONF_ON_FINGER_SCAN_START = "on_finger_scan_start"
|
||||||
CONF_ON_FINGER_SCAN_UNMATCHED = "on_finger_scan_unmatched"
|
CONF_ON_FINGER_SCAN_UNMATCHED = "on_finger_scan_unmatched"
|
||||||
CONF_ON_FINISHED_WRITE = "on_finished_write"
|
CONF_ON_FINISHED_WRITE = "on_finished_write"
|
||||||
|
CONF_ON_IDLE = "on_idle"
|
||||||
CONF_ON_JSON_MESSAGE = "on_json_message"
|
CONF_ON_JSON_MESSAGE = "on_json_message"
|
||||||
CONF_ON_LOCK = "on_lock"
|
CONF_ON_LOCK = "on_lock"
|
||||||
CONF_ON_LOOP = "on_loop"
|
CONF_ON_LOOP = "on_loop"
|
||||||
|
@ -702,6 +706,7 @@ CONF_RGBW = "rgbw"
|
||||||
CONF_RISING_EDGE = "rising_edge"
|
CONF_RISING_EDGE = "rising_edge"
|
||||||
CONF_RMT_CHANNEL = "rmt_channel"
|
CONF_RMT_CHANNEL = "rmt_channel"
|
||||||
CONF_ROTATION = "rotation"
|
CONF_ROTATION = "rotation"
|
||||||
|
CONF_ROW = "row"
|
||||||
CONF_RS_PIN = "rs_pin"
|
CONF_RS_PIN = "rs_pin"
|
||||||
CONF_RTD_NOMINAL_RESISTANCE = "rtd_nominal_resistance"
|
CONF_RTD_NOMINAL_RESISTANCE = "rtd_nominal_resistance"
|
||||||
CONF_RTD_WIRES = "rtd_wires"
|
CONF_RTD_WIRES = "rtd_wires"
|
||||||
|
|
21
tests/components/absolute_humidity/common.yaml
Normal file
21
tests/components/absolute_humidity/common.yaml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
sensor:
|
||||||
|
- platform: absolute_humidity
|
||||||
|
name: Absolute Humidity
|
||||||
|
temperature: template_temperature
|
||||||
|
humidity: template_humidity
|
||||||
|
- platform: template
|
||||||
|
id: template_humidity
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 10000) {
|
||||||
|
return 0.6;
|
||||||
|
} else {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
- platform: template
|
||||||
|
id: template_temperature
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 10000) {
|
||||||
|
return 42.0;
|
||||||
|
} else {
|
||||||
|
return 0.0;
|
||||||
|
}
|
|
@ -1,21 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: absolute_humidity
|
|
||||||
name: Absolute Humidity
|
|
||||||
temperature: template_temperature
|
|
||||||
humidity: template_humidity
|
|
||||||
- platform: template
|
|
||||||
id: template_humidity
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 0.6;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: template_temperature
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,21 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: absolute_humidity
|
|
||||||
name: Absolute Humidity
|
|
||||||
temperature: template_temperature
|
|
||||||
humidity: template_humidity
|
|
||||||
- platform: template
|
|
||||||
id: template_humidity
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 0.6;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: template_temperature
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,21 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: absolute_humidity
|
|
||||||
name: Absolute Humidity
|
|
||||||
temperature: template_temperature
|
|
||||||
humidity: template_humidity
|
|
||||||
- platform: template
|
|
||||||
id: template_humidity
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 0.6;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: template_temperature
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,21 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: absolute_humidity
|
|
||||||
name: Absolute Humidity
|
|
||||||
temperature: template_temperature
|
|
||||||
humidity: template_humidity
|
|
||||||
- platform: template
|
|
||||||
id: template_humidity
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 0.6;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: template_temperature
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,21 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: absolute_humidity
|
|
||||||
name: Absolute Humidity
|
|
||||||
temperature: template_temperature
|
|
||||||
humidity: template_humidity
|
|
||||||
- platform: template
|
|
||||||
id: template_humidity
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 0.6;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: template_temperature
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,21 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: absolute_humidity
|
|
||||||
name: Absolute Humidity
|
|
||||||
temperature: template_temperature
|
|
||||||
humidity: template_humidity
|
|
||||||
- platform: template
|
|
||||||
id: template_humidity
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 0.6;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: template_temperature
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
22
tests/components/airthings_wave_mini/common.yaml
Normal file
22
tests/components/airthings_wave_mini/common.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: airthingsmini01
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- id: airthingswm
|
||||||
|
platform: airthings_wave_mini
|
||||||
|
ble_client_id: airthingsmini01
|
||||||
|
update_interval: 5min
|
||||||
|
battery_update_interval: 12h
|
||||||
|
temperature:
|
||||||
|
name: Wave Mini Temperature
|
||||||
|
humidity:
|
||||||
|
name: Wave Mini Humidity
|
||||||
|
pressure:
|
||||||
|
name: Wave Mini Pressure
|
||||||
|
tvoc:
|
||||||
|
name: Wave Mini VOC
|
||||||
|
battery_voltage:
|
||||||
|
name: Wave Mini Battery Voltage
|
|
@ -1,22 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthingsmini01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswm
|
|
||||||
platform: airthings_wave_mini
|
|
||||||
ble_client_id: airthingsmini01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Mini Temperature
|
|
||||||
humidity:
|
|
||||||
name: Wave Mini Humidity
|
|
||||||
pressure:
|
|
||||||
name: Wave Mini Pressure
|
|
||||||
tvoc:
|
|
||||||
name: Wave Mini VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Mini Battery Voltage
|
|
||||||
|
|
|
@ -1,22 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthingsmini01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswm
|
|
||||||
platform: airthings_wave_mini
|
|
||||||
ble_client_id: airthingsmini01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Mini Temperature
|
|
||||||
humidity:
|
|
||||||
name: Wave Mini Humidity
|
|
||||||
pressure:
|
|
||||||
name: Wave Mini Pressure
|
|
||||||
tvoc:
|
|
||||||
name: Wave Mini VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Mini Battery Voltage
|
|
||||||
|
|
|
@ -1,22 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthingsmini01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswm
|
|
||||||
platform: airthings_wave_mini
|
|
||||||
ble_client_id: airthingsmini01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Mini Temperature
|
|
||||||
humidity:
|
|
||||||
name: Wave Mini Humidity
|
|
||||||
pressure:
|
|
||||||
name: Wave Mini Pressure
|
|
||||||
tvoc:
|
|
||||||
name: Wave Mini VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Mini Battery Voltage
|
|
||||||
|
|
|
@ -1,22 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthingsmini01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswm
|
|
||||||
platform: airthings_wave_mini
|
|
||||||
ble_client_id: airthingsmini01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Mini Temperature
|
|
||||||
humidity:
|
|
||||||
name: Wave Mini Humidity
|
|
||||||
pressure:
|
|
||||||
name: Wave Mini Pressure
|
|
||||||
tvoc:
|
|
||||||
name: Wave Mini VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Mini Battery Voltage
|
|
||||||
|
|
28
tests/components/airthings_wave_plus/common.yaml
Normal file
28
tests/components/airthings_wave_plus/common.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: airthings01
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- id: airthingswp
|
||||||
|
platform: airthings_wave_plus
|
||||||
|
ble_client_id: airthings01
|
||||||
|
update_interval: 5min
|
||||||
|
battery_update_interval: 12h
|
||||||
|
temperature:
|
||||||
|
name: Wave Plus Temperature
|
||||||
|
radon:
|
||||||
|
name: Wave Plus Radon
|
||||||
|
radon_long_term:
|
||||||
|
name: Wave Plus Radon Long Term
|
||||||
|
pressure:
|
||||||
|
name: Wave Plus Pressure
|
||||||
|
humidity:
|
||||||
|
name: Wave Plus Humidity
|
||||||
|
co2:
|
||||||
|
name: Wave Plus CO2
|
||||||
|
tvoc:
|
||||||
|
name: Wave Plus VOC
|
||||||
|
battery_voltage:
|
||||||
|
name: Wave Plus Battery Voltage
|
|
@ -1,28 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthings01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswp
|
|
||||||
platform: airthings_wave_plus
|
|
||||||
ble_client_id: airthings01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Plus Temperature
|
|
||||||
radon:
|
|
||||||
name: Wave Plus Radon
|
|
||||||
radon_long_term:
|
|
||||||
name: Wave Plus Radon Long Term
|
|
||||||
pressure:
|
|
||||||
name: Wave Plus Pressure
|
|
||||||
humidity:
|
|
||||||
name: Wave Plus Humidity
|
|
||||||
co2:
|
|
||||||
name: Wave Plus CO2
|
|
||||||
tvoc:
|
|
||||||
name: Wave Plus VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Plus Battery Voltage
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthings01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswp
|
|
||||||
platform: airthings_wave_plus
|
|
||||||
ble_client_id: airthings01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Plus Temperature
|
|
||||||
radon:
|
|
||||||
name: Wave Plus Radon
|
|
||||||
radon_long_term:
|
|
||||||
name: Wave Plus Radon Long Term
|
|
||||||
pressure:
|
|
||||||
name: Wave Plus Pressure
|
|
||||||
humidity:
|
|
||||||
name: Wave Plus Humidity
|
|
||||||
co2:
|
|
||||||
name: Wave Plus CO2
|
|
||||||
tvoc:
|
|
||||||
name: Wave Plus VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Plus Battery Voltage
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthings01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswp
|
|
||||||
platform: airthings_wave_plus
|
|
||||||
ble_client_id: airthings01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Plus Temperature
|
|
||||||
radon:
|
|
||||||
name: Wave Plus Radon
|
|
||||||
radon_long_term:
|
|
||||||
name: Wave Plus Radon Long Term
|
|
||||||
pressure:
|
|
||||||
name: Wave Plus Pressure
|
|
||||||
humidity:
|
|
||||||
name: Wave Plus Humidity
|
|
||||||
co2:
|
|
||||||
name: Wave Plus CO2
|
|
||||||
tvoc:
|
|
||||||
name: Wave Plus VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Plus Battery Voltage
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: airthings01
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- id: airthingswp
|
|
||||||
platform: airthings_wave_plus
|
|
||||||
ble_client_id: airthings01
|
|
||||||
update_interval: 5min
|
|
||||||
battery_update_interval: 12h
|
|
||||||
temperature:
|
|
||||||
name: Wave Plus Temperature
|
|
||||||
radon:
|
|
||||||
name: Wave Plus Radon
|
|
||||||
radon_long_term:
|
|
||||||
name: Wave Plus Radon Long Term
|
|
||||||
pressure:
|
|
||||||
name: Wave Plus Pressure
|
|
||||||
humidity:
|
|
||||||
name: Wave Plus Humidity
|
|
||||||
co2:
|
|
||||||
name: Wave Plus CO2
|
|
||||||
tvoc:
|
|
||||||
name: Wave Plus VOC
|
|
||||||
battery_voltage:
|
|
||||||
name: Wave Plus Battery Voltage
|
|
||||||
|
|
64
tests/components/alarm_control_panel/common.yaml
Normal file
64
tests/components/alarm_control_panel/common.yaml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
binary_sensor:
|
||||||
|
- platform: gpio
|
||||||
|
id: bin1
|
||||||
|
pin: 1
|
||||||
|
|
||||||
|
alarm_control_panel:
|
||||||
|
- platform: template
|
||||||
|
id: alarmcontrolpanel1
|
||||||
|
name: Alarm Panel
|
||||||
|
codes:
|
||||||
|
- "1234"
|
||||||
|
requires_code_to_arm: true
|
||||||
|
arming_home_time: 1s
|
||||||
|
arming_night_time: 1s
|
||||||
|
arming_away_time: 15s
|
||||||
|
pending_time: 15s
|
||||||
|
trigger_time: 30s
|
||||||
|
binary_sensors:
|
||||||
|
- input: bin1
|
||||||
|
bypass_armed_home: true
|
||||||
|
bypass_armed_night: true
|
||||||
|
on_state:
|
||||||
|
then:
|
||||||
|
- lambda: !lambda |-
|
||||||
|
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
||||||
|
- platform: template
|
||||||
|
id: alarmcontrolpanel2
|
||||||
|
name: Alarm Panel
|
||||||
|
codes:
|
||||||
|
- "1234"
|
||||||
|
requires_code_to_arm: true
|
||||||
|
arming_home_time: 1s
|
||||||
|
arming_night_time: 1s
|
||||||
|
arming_away_time: 15s
|
||||||
|
pending_time: 15s
|
||||||
|
trigger_time: 30s
|
||||||
|
binary_sensors:
|
||||||
|
- input: bin1
|
||||||
|
bypass_armed_home: true
|
||||||
|
bypass_armed_night: true
|
||||||
|
on_disarmed:
|
||||||
|
then:
|
||||||
|
- logger.log: "### DISARMED ###"
|
||||||
|
on_pending:
|
||||||
|
then:
|
||||||
|
- logger.log: "### PENDING ###"
|
||||||
|
on_arming:
|
||||||
|
then:
|
||||||
|
- logger.log: "### ARMING ###"
|
||||||
|
on_armed_home:
|
||||||
|
then:
|
||||||
|
- logger.log: "### ARMED HOME ###"
|
||||||
|
on_armed_night:
|
||||||
|
then:
|
||||||
|
- logger.log: "### ARMED NIGHT ###"
|
||||||
|
on_armed_away:
|
||||||
|
then:
|
||||||
|
- logger.log: "### ARMED AWAY ###"
|
||||||
|
on_triggered:
|
||||||
|
then:
|
||||||
|
- logger.log: "### TRIGGERED ###"
|
||||||
|
on_cleared:
|
||||||
|
then:
|
||||||
|
- logger.log: "### CLEARED ###"
|
|
@ -1,64 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: gpio
|
|
||||||
id: bin1
|
|
||||||
pin: 1
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel1
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_state:
|
|
||||||
then:
|
|
||||||
- lambda: !lambda |-
|
|
||||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel2
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_disarmed:
|
|
||||||
then:
|
|
||||||
- logger.log: "### DISARMED ###"
|
|
||||||
on_pending:
|
|
||||||
then:
|
|
||||||
- logger.log: "### PENDING ###"
|
|
||||||
on_arming:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMING ###"
|
|
||||||
on_armed_home:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED HOME ###"
|
|
||||||
on_armed_night:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED NIGHT ###"
|
|
||||||
on_armed_away:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED AWAY ###"
|
|
||||||
on_triggered:
|
|
||||||
then:
|
|
||||||
- logger.log: "### TRIGGERED ###"
|
|
||||||
on_cleared:
|
|
||||||
then:
|
|
||||||
- logger.log: "### CLEARED ###"
|
|
||||||
|
|
|
@ -1,64 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: gpio
|
|
||||||
id: bin1
|
|
||||||
pin: 1
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel1
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_state:
|
|
||||||
then:
|
|
||||||
- lambda: !lambda |-
|
|
||||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel2
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_disarmed:
|
|
||||||
then:
|
|
||||||
- logger.log: "### DISARMED ###"
|
|
||||||
on_pending:
|
|
||||||
then:
|
|
||||||
- logger.log: "### PENDING ###"
|
|
||||||
on_arming:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMING ###"
|
|
||||||
on_armed_home:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED HOME ###"
|
|
||||||
on_armed_night:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED NIGHT ###"
|
|
||||||
on_armed_away:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED AWAY ###"
|
|
||||||
on_triggered:
|
|
||||||
then:
|
|
||||||
- logger.log: "### TRIGGERED ###"
|
|
||||||
on_cleared:
|
|
||||||
then:
|
|
||||||
- logger.log: "### CLEARED ###"
|
|
||||||
|
|
|
@ -1,64 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: gpio
|
|
||||||
id: bin1
|
|
||||||
pin: 1
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel1
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_state:
|
|
||||||
then:
|
|
||||||
- lambda: !lambda |-
|
|
||||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel2
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_disarmed:
|
|
||||||
then:
|
|
||||||
- logger.log: "### DISARMED ###"
|
|
||||||
on_pending:
|
|
||||||
then:
|
|
||||||
- logger.log: "### PENDING ###"
|
|
||||||
on_arming:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMING ###"
|
|
||||||
on_armed_home:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED HOME ###"
|
|
||||||
on_armed_night:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED NIGHT ###"
|
|
||||||
on_armed_away:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED AWAY ###"
|
|
||||||
on_triggered:
|
|
||||||
then:
|
|
||||||
- logger.log: "### TRIGGERED ###"
|
|
||||||
on_cleared:
|
|
||||||
then:
|
|
||||||
- logger.log: "### CLEARED ###"
|
|
||||||
|
|
|
@ -1,64 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: gpio
|
|
||||||
id: bin1
|
|
||||||
pin: 1
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel1
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_state:
|
|
||||||
then:
|
|
||||||
- lambda: !lambda |-
|
|
||||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel2
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_disarmed:
|
|
||||||
then:
|
|
||||||
- logger.log: "### DISARMED ###"
|
|
||||||
on_pending:
|
|
||||||
then:
|
|
||||||
- logger.log: "### PENDING ###"
|
|
||||||
on_arming:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMING ###"
|
|
||||||
on_armed_home:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED HOME ###"
|
|
||||||
on_armed_night:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED NIGHT ###"
|
|
||||||
on_armed_away:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED AWAY ###"
|
|
||||||
on_triggered:
|
|
||||||
then:
|
|
||||||
- logger.log: "### TRIGGERED ###"
|
|
||||||
on_cleared:
|
|
||||||
then:
|
|
||||||
- logger.log: "### CLEARED ###"
|
|
||||||
|
|
|
@ -1,64 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: gpio
|
|
||||||
id: bin1
|
|
||||||
pin: 1
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel1
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_state:
|
|
||||||
then:
|
|
||||||
- lambda: !lambda |-
|
|
||||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel2
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_disarmed:
|
|
||||||
then:
|
|
||||||
- logger.log: "### DISARMED ###"
|
|
||||||
on_pending:
|
|
||||||
then:
|
|
||||||
- logger.log: "### PENDING ###"
|
|
||||||
on_arming:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMING ###"
|
|
||||||
on_armed_home:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED HOME ###"
|
|
||||||
on_armed_night:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED NIGHT ###"
|
|
||||||
on_armed_away:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED AWAY ###"
|
|
||||||
on_triggered:
|
|
||||||
then:
|
|
||||||
- logger.log: "### TRIGGERED ###"
|
|
||||||
on_cleared:
|
|
||||||
then:
|
|
||||||
- logger.log: "### CLEARED ###"
|
|
||||||
|
|
|
@ -1,64 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: gpio
|
|
||||||
id: bin1
|
|
||||||
pin: 1
|
|
||||||
|
|
||||||
alarm_control_panel:
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel1
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_state:
|
|
||||||
then:
|
|
||||||
- lambda: !lambda |-
|
|
||||||
ESP_LOGD("TEST", "State change %s", LOG_STR_ARG(alarm_control_panel_state_to_string(id(alarmcontrolpanel1)->get_state())));
|
|
||||||
- platform: template
|
|
||||||
id: alarmcontrolpanel2
|
|
||||||
name: Alarm Panel
|
|
||||||
codes:
|
|
||||||
- "1234"
|
|
||||||
requires_code_to_arm: true
|
|
||||||
arming_home_time: 1s
|
|
||||||
arming_night_time: 1s
|
|
||||||
arming_away_time: 15s
|
|
||||||
pending_time: 15s
|
|
||||||
trigger_time: 30s
|
|
||||||
binary_sensors:
|
|
||||||
- input: bin1
|
|
||||||
bypass_armed_home: true
|
|
||||||
bypass_armed_night: true
|
|
||||||
on_disarmed:
|
|
||||||
then:
|
|
||||||
- logger.log: "### DISARMED ###"
|
|
||||||
on_pending:
|
|
||||||
then:
|
|
||||||
- logger.log: "### PENDING ###"
|
|
||||||
on_arming:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMING ###"
|
|
||||||
on_armed_home:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED HOME ###"
|
|
||||||
on_armed_night:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED NIGHT ###"
|
|
||||||
on_armed_away:
|
|
||||||
then:
|
|
||||||
- logger.log: "### ARMED AWAY ###"
|
|
||||||
on_triggered:
|
|
||||||
then:
|
|
||||||
- logger.log: "### TRIGGERED ###"
|
|
||||||
on_cleared:
|
|
||||||
then:
|
|
||||||
- logger.log: "### CLEARED ###"
|
|
||||||
|
|
17
tests/components/alpha3/common.yaml
Normal file
17
tests/components/alpha3/common.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: alpha3_blec
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: alpha3
|
||||||
|
ble_client_id: alpha3_blec
|
||||||
|
flow:
|
||||||
|
name: "Radiator Pump Flow"
|
||||||
|
head:
|
||||||
|
name: "Radiator Pump Head"
|
||||||
|
power:
|
||||||
|
name: "Radiator Pump Power"
|
||||||
|
speed:
|
||||||
|
name: "Radiator Pump Speed"
|
|
@ -1,17 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: alpha3_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: alpha3
|
|
||||||
ble_client_id: alpha3_blec
|
|
||||||
flow:
|
|
||||||
name: "Radiator Pump Flow"
|
|
||||||
head:
|
|
||||||
name: "Radiator Pump Head"
|
|
||||||
power:
|
|
||||||
name: "Radiator Pump Power"
|
|
||||||
speed:
|
|
||||||
name: "Radiator Pump Speed"
|
|
||||||
|
|
|
@ -1,17 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: alpha3_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: alpha3
|
|
||||||
ble_client_id: alpha3_blec
|
|
||||||
flow:
|
|
||||||
name: "Radiator Pump Flow"
|
|
||||||
head:
|
|
||||||
name: "Radiator Pump Head"
|
|
||||||
power:
|
|
||||||
name: "Radiator Pump Power"
|
|
||||||
speed:
|
|
||||||
name: "Radiator Pump Speed"
|
|
||||||
|
|
|
@ -1,17 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: alpha3_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: alpha3
|
|
||||||
ble_client_id: alpha3_blec
|
|
||||||
flow:
|
|
||||||
name: "Radiator Pump Flow"
|
|
||||||
head:
|
|
||||||
name: "Radiator Pump Head"
|
|
||||||
power:
|
|
||||||
name: "Radiator Pump Power"
|
|
||||||
speed:
|
|
||||||
name: "Radiator Pump Speed"
|
|
||||||
|
|
|
@ -1,17 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: alpha3_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: alpha3
|
|
||||||
ble_client_id: alpha3_blec
|
|
||||||
flow:
|
|
||||||
name: "Radiator Pump Flow"
|
|
||||||
head:
|
|
||||||
name: "Radiator Pump Head"
|
|
||||||
power:
|
|
||||||
name: "Radiator Pump Power"
|
|
||||||
speed:
|
|
||||||
name: "Radiator Pump Speed"
|
|
||||||
|
|
19
tests/components/am43/common.yaml
Normal file
19
tests/components/am43/common.yaml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: am43_blec
|
||||||
|
|
||||||
|
cover:
|
||||||
|
- platform: am43
|
||||||
|
name: Test AM43 Cover
|
||||||
|
id: am43_test
|
||||||
|
ble_client_id: am43_blec
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: am43
|
||||||
|
ble_client_id: am43_blec
|
||||||
|
battery_level:
|
||||||
|
name: Kitchen blinds battery
|
||||||
|
illuminance:
|
||||||
|
name: Kitchen blinds light
|
|
@ -1,19 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: am43_blec
|
|
||||||
|
|
||||||
cover:
|
|
||||||
- platform: am43
|
|
||||||
name: Test AM43 Cover
|
|
||||||
id: am43_test
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: am43
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
battery_level:
|
|
||||||
name: Kitchen blinds battery
|
|
||||||
illuminance:
|
|
||||||
name: Kitchen blinds light
|
|
||||||
|
|
|
@ -1,19 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: am43_blec
|
|
||||||
|
|
||||||
cover:
|
|
||||||
- platform: am43
|
|
||||||
name: Test AM43 Cover
|
|
||||||
id: am43_test
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: am43
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
battery_level:
|
|
||||||
name: Kitchen blinds battery
|
|
||||||
illuminance:
|
|
||||||
name: Kitchen blinds light
|
|
||||||
|
|
|
@ -1,19 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: am43_blec
|
|
||||||
|
|
||||||
cover:
|
|
||||||
- platform: am43
|
|
||||||
name: Test AM43 Cover
|
|
||||||
id: am43_test
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: am43
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
battery_level:
|
|
||||||
name: Kitchen blinds battery
|
|
||||||
illuminance:
|
|
||||||
name: Kitchen blinds light
|
|
||||||
|
|
|
@ -1,19 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: am43_blec
|
|
||||||
|
|
||||||
cover:
|
|
||||||
- platform: am43
|
|
||||||
name: Test AM43 Cover
|
|
||||||
id: am43_test
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: am43
|
|
||||||
ble_client_id: am43_blec
|
|
||||||
battery_level:
|
|
||||||
name: Kitchen blinds battery
|
|
||||||
illuminance:
|
|
||||||
name: Kitchen blinds light
|
|
||||||
|
|
28
tests/components/analog_threshold/common.yaml
Normal file
28
tests/components/analog_threshold/common.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
sensor:
|
||||||
|
- platform: template
|
||||||
|
id: template_sensor
|
||||||
|
name: Template Sensor
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 10000) {
|
||||||
|
return 42.0;
|
||||||
|
} else {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
update_interval: 15s
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: analog_threshold
|
||||||
|
name: Analog Threshold 1
|
||||||
|
sensor_id: template_sensor
|
||||||
|
threshold:
|
||||||
|
upper: 110
|
||||||
|
lower: 90
|
||||||
|
filters:
|
||||||
|
- delayed_on: 0s
|
||||||
|
- delayed_off: 10s
|
||||||
|
- platform: analog_threshold
|
||||||
|
name: Analog Threshold 2
|
||||||
|
sensor_id: template_sensor
|
||||||
|
threshold: 100
|
||||||
|
filters:
|
||||||
|
- invert:
|
|
@ -1,28 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_sensor
|
|
||||||
name: Template Sensor
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 15s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 1
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold:
|
|
||||||
upper: 110
|
|
||||||
lower: 90
|
|
||||||
filters:
|
|
||||||
- delayed_on: 0s
|
|
||||||
- delayed_off: 10s
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 2
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold: 100
|
|
||||||
filters:
|
|
||||||
- invert:
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_sensor
|
|
||||||
name: Template Sensor
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 15s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 1
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold:
|
|
||||||
upper: 110
|
|
||||||
lower: 90
|
|
||||||
filters:
|
|
||||||
- delayed_on: 0s
|
|
||||||
- delayed_off: 10s
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 2
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold: 100
|
|
||||||
filters:
|
|
||||||
- invert:
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_sensor
|
|
||||||
name: Template Sensor
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 15s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 1
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold:
|
|
||||||
upper: 110
|
|
||||||
lower: 90
|
|
||||||
filters:
|
|
||||||
- delayed_on: 0s
|
|
||||||
- delayed_off: 10s
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 2
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold: 100
|
|
||||||
filters:
|
|
||||||
- invert:
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_sensor
|
|
||||||
name: Template Sensor
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 15s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 1
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold:
|
|
||||||
upper: 110
|
|
||||||
lower: 90
|
|
||||||
filters:
|
|
||||||
- delayed_on: 0s
|
|
||||||
- delayed_off: 10s
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 2
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold: 100
|
|
||||||
filters:
|
|
||||||
- invert:
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_sensor
|
|
||||||
name: Template Sensor
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 15s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 1
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold:
|
|
||||||
upper: 110
|
|
||||||
lower: 90
|
|
||||||
filters:
|
|
||||||
- delayed_on: 0s
|
|
||||||
- delayed_off: 10s
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 2
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold: 100
|
|
||||||
filters:
|
|
||||||
- invert:
|
|
||||||
|
|
|
@ -1,28 +1 @@
|
||||||
sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_sensor
|
|
||||||
name: Template Sensor
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 15s
|
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 1
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold:
|
|
||||||
upper: 110
|
|
||||||
lower: 90
|
|
||||||
filters:
|
|
||||||
- delayed_on: 0s
|
|
||||||
- delayed_off: 10s
|
|
||||||
- platform: analog_threshold
|
|
||||||
name: Analog Threshold 2
|
|
||||||
sensor_id: template_sensor
|
|
||||||
threshold: 100
|
|
||||||
filters:
|
|
||||||
- invert:
|
|
||||||
|
|
11
tests/components/anova/common.yaml
Normal file
11
tests/components/anova/common.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: anova_blec
|
||||||
|
|
||||||
|
climate:
|
||||||
|
- platform: anova
|
||||||
|
name: Anova cooker
|
||||||
|
ble_client_id: anova_blec
|
||||||
|
unit_of_measurement: c
|
|
@ -1,11 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: anova_blec
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: anova
|
|
||||||
name: Anova cooker
|
|
||||||
ble_client_id: anova_blec
|
|
||||||
unit_of_measurement: c
|
|
||||||
|
|
|
@ -1,11 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: anova_blec
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: anova
|
|
||||||
name: Anova cooker
|
|
||||||
ble_client_id: anova_blec
|
|
||||||
unit_of_measurement: c
|
|
||||||
|
|
|
@ -1,11 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: anova_blec
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: anova
|
|
||||||
name: Anova cooker
|
|
||||||
ble_client_id: anova_blec
|
|
||||||
unit_of_measurement: c
|
|
||||||
|
|
|
@ -1,11 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: anova_blec
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: anova
|
|
||||||
name: Anova cooker
|
|
||||||
ble_client_id: anova_blec
|
|
||||||
unit_of_measurement: c
|
|
||||||
|
|
63
tests/components/api/common.yaml
Normal file
63
tests/components/api/common.yaml
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
esphome:
|
||||||
|
on_boot:
|
||||||
|
then:
|
||||||
|
- homeassistant.event:
|
||||||
|
event: esphome.button_pressed
|
||||||
|
data:
|
||||||
|
message: Button was pressed
|
||||||
|
- homeassistant.service:
|
||||||
|
service: notify.html5
|
||||||
|
data:
|
||||||
|
message: Button was pressed
|
||||||
|
- homeassistant.tag_scanned: pulse
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: MySSID
|
||||||
|
password: password1
|
||||||
|
|
||||||
|
api:
|
||||||
|
port: 8000
|
||||||
|
password: pwd
|
||||||
|
reboot_timeout: 0min
|
||||||
|
encryption:
|
||||||
|
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
||||||
|
services:
|
||||||
|
- service: hello_world
|
||||||
|
variables:
|
||||||
|
name: string
|
||||||
|
then:
|
||||||
|
- logger.log:
|
||||||
|
format: Hello World %s!
|
||||||
|
args:
|
||||||
|
- name.c_str()
|
||||||
|
- service: empty_service
|
||||||
|
then:
|
||||||
|
- logger.log: Service Called
|
||||||
|
- service: all_types
|
||||||
|
variables:
|
||||||
|
bool_: bool
|
||||||
|
int_: int
|
||||||
|
float_: float
|
||||||
|
string_: string
|
||||||
|
then:
|
||||||
|
- logger.log: Something happened
|
||||||
|
- service: array_types
|
||||||
|
variables:
|
||||||
|
bool_arr: bool[]
|
||||||
|
int_arr: int[]
|
||||||
|
float_arr: float[]
|
||||||
|
string_arr: string[]
|
||||||
|
then:
|
||||||
|
- logger.log:
|
||||||
|
# yamllint disable rule:line-length
|
||||||
|
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
||||||
|
# yamllint enable rule:line-length
|
||||||
|
args:
|
||||||
|
- YESNO(bool_arr[0])
|
||||||
|
- bool_arr.size()
|
||||||
|
- int_arr[0]
|
||||||
|
- int_arr.size()
|
||||||
|
- float_arr[0]
|
||||||
|
- float_arr.size()
|
||||||
|
- string_arr[0].c_str()
|
||||||
|
- string_arr.size()
|
|
@ -1,63 +1 @@
|
||||||
esphome:
|
<<: !include common.yaml
|
||||||
on_boot:
|
|
||||||
then:
|
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.button_pressed
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.service:
|
|
||||||
service: notify.html5
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.tag_scanned: pulse
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
api:
|
|
||||||
port: 8000
|
|
||||||
password: pwd
|
|
||||||
reboot_timeout: 0min
|
|
||||||
encryption:
|
|
||||||
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
||||||
services:
|
|
||||||
- service: hello_world
|
|
||||||
variables:
|
|
||||||
name: string
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
format: Hello World %s!
|
|
||||||
args:
|
|
||||||
- name.c_str()
|
|
||||||
- service: empty_service
|
|
||||||
then:
|
|
||||||
- logger.log: Service Called
|
|
||||||
- service: all_types
|
|
||||||
variables:
|
|
||||||
bool_: bool
|
|
||||||
int_: int
|
|
||||||
float_: float
|
|
||||||
string_: string
|
|
||||||
then:
|
|
||||||
- logger.log: Something happened
|
|
||||||
- service: array_types
|
|
||||||
variables:
|
|
||||||
bool_arr: bool[]
|
|
||||||
int_arr: int[]
|
|
||||||
float_arr: float[]
|
|
||||||
string_arr: string[]
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
args:
|
|
||||||
- YESNO(bool_arr[0])
|
|
||||||
- bool_arr.size()
|
|
||||||
- int_arr[0]
|
|
||||||
- int_arr.size()
|
|
||||||
- float_arr[0]
|
|
||||||
- float_arr.size()
|
|
||||||
- string_arr[0].c_str()
|
|
||||||
- string_arr.size()
|
|
||||||
|
|
|
@ -1,63 +1 @@
|
||||||
esphome:
|
<<: !include common.yaml
|
||||||
on_boot:
|
|
||||||
then:
|
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.button_pressed
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.service:
|
|
||||||
service: notify.html5
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.tag_scanned: pulse
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
api:
|
|
||||||
port: 8000
|
|
||||||
password: pwd
|
|
||||||
reboot_timeout: 0min
|
|
||||||
encryption:
|
|
||||||
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
||||||
services:
|
|
||||||
- service: hello_world
|
|
||||||
variables:
|
|
||||||
name: string
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
format: Hello World %s!
|
|
||||||
args:
|
|
||||||
- name.c_str()
|
|
||||||
- service: empty_service
|
|
||||||
then:
|
|
||||||
- logger.log: Service Called
|
|
||||||
- service: all_types
|
|
||||||
variables:
|
|
||||||
bool_: bool
|
|
||||||
int_: int
|
|
||||||
float_: float
|
|
||||||
string_: string
|
|
||||||
then:
|
|
||||||
- logger.log: Something happened
|
|
||||||
- service: array_types
|
|
||||||
variables:
|
|
||||||
bool_arr: bool[]
|
|
||||||
int_arr: int[]
|
|
||||||
float_arr: float[]
|
|
||||||
string_arr: string[]
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
args:
|
|
||||||
- YESNO(bool_arr[0])
|
|
||||||
- bool_arr.size()
|
|
||||||
- int_arr[0]
|
|
||||||
- int_arr.size()
|
|
||||||
- float_arr[0]
|
|
||||||
- float_arr.size()
|
|
||||||
- string_arr[0].c_str()
|
|
||||||
- string_arr.size()
|
|
||||||
|
|
|
@ -1,63 +1 @@
|
||||||
esphome:
|
<<: !include common.yaml
|
||||||
on_boot:
|
|
||||||
then:
|
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.button_pressed
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.service:
|
|
||||||
service: notify.html5
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.tag_scanned: pulse
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
api:
|
|
||||||
port: 8000
|
|
||||||
password: pwd
|
|
||||||
reboot_timeout: 0min
|
|
||||||
encryption:
|
|
||||||
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
||||||
services:
|
|
||||||
- service: hello_world
|
|
||||||
variables:
|
|
||||||
name: string
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
format: Hello World %s!
|
|
||||||
args:
|
|
||||||
- name.c_str()
|
|
||||||
- service: empty_service
|
|
||||||
then:
|
|
||||||
- logger.log: Service Called
|
|
||||||
- service: all_types
|
|
||||||
variables:
|
|
||||||
bool_: bool
|
|
||||||
int_: int
|
|
||||||
float_: float
|
|
||||||
string_: string
|
|
||||||
then:
|
|
||||||
- logger.log: Something happened
|
|
||||||
- service: array_types
|
|
||||||
variables:
|
|
||||||
bool_arr: bool[]
|
|
||||||
int_arr: int[]
|
|
||||||
float_arr: float[]
|
|
||||||
string_arr: string[]
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
args:
|
|
||||||
- YESNO(bool_arr[0])
|
|
||||||
- bool_arr.size()
|
|
||||||
- int_arr[0]
|
|
||||||
- int_arr.size()
|
|
||||||
- float_arr[0]
|
|
||||||
- float_arr.size()
|
|
||||||
- string_arr[0].c_str()
|
|
||||||
- string_arr.size()
|
|
||||||
|
|
|
@ -1,63 +1 @@
|
||||||
esphome:
|
<<: !include common.yaml
|
||||||
on_boot:
|
|
||||||
then:
|
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.button_pressed
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.service:
|
|
||||||
service: notify.html5
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.tag_scanned: pulse
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
api:
|
|
||||||
port: 8000
|
|
||||||
password: pwd
|
|
||||||
reboot_timeout: 0min
|
|
||||||
encryption:
|
|
||||||
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
||||||
services:
|
|
||||||
- service: hello_world
|
|
||||||
variables:
|
|
||||||
name: string
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
format: Hello World %s!
|
|
||||||
args:
|
|
||||||
- name.c_str()
|
|
||||||
- service: empty_service
|
|
||||||
then:
|
|
||||||
- logger.log: Service Called
|
|
||||||
- service: all_types
|
|
||||||
variables:
|
|
||||||
bool_: bool
|
|
||||||
int_: int
|
|
||||||
float_: float
|
|
||||||
string_: string
|
|
||||||
then:
|
|
||||||
- logger.log: Something happened
|
|
||||||
- service: array_types
|
|
||||||
variables:
|
|
||||||
bool_arr: bool[]
|
|
||||||
int_arr: int[]
|
|
||||||
float_arr: float[]
|
|
||||||
string_arr: string[]
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
args:
|
|
||||||
- YESNO(bool_arr[0])
|
|
||||||
- bool_arr.size()
|
|
||||||
- int_arr[0]
|
|
||||||
- int_arr.size()
|
|
||||||
- float_arr[0]
|
|
||||||
- float_arr.size()
|
|
||||||
- string_arr[0].c_str()
|
|
||||||
- string_arr.size()
|
|
||||||
|
|
|
@ -1,63 +1 @@
|
||||||
esphome:
|
<<: !include common.yaml
|
||||||
on_boot:
|
|
||||||
then:
|
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.button_pressed
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.service:
|
|
||||||
service: notify.html5
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.tag_scanned: pulse
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
api:
|
|
||||||
port: 8000
|
|
||||||
password: pwd
|
|
||||||
reboot_timeout: 0min
|
|
||||||
encryption:
|
|
||||||
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
||||||
services:
|
|
||||||
- service: hello_world
|
|
||||||
variables:
|
|
||||||
name: string
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
format: Hello World %s!
|
|
||||||
args:
|
|
||||||
- name.c_str()
|
|
||||||
- service: empty_service
|
|
||||||
then:
|
|
||||||
- logger.log: Service Called
|
|
||||||
- service: all_types
|
|
||||||
variables:
|
|
||||||
bool_: bool
|
|
||||||
int_: int
|
|
||||||
float_: float
|
|
||||||
string_: string
|
|
||||||
then:
|
|
||||||
- logger.log: Something happened
|
|
||||||
- service: array_types
|
|
||||||
variables:
|
|
||||||
bool_arr: bool[]
|
|
||||||
int_arr: int[]
|
|
||||||
float_arr: float[]
|
|
||||||
string_arr: string[]
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
args:
|
|
||||||
- YESNO(bool_arr[0])
|
|
||||||
- bool_arr.size()
|
|
||||||
- int_arr[0]
|
|
||||||
- int_arr.size()
|
|
||||||
- float_arr[0]
|
|
||||||
- float_arr.size()
|
|
||||||
- string_arr[0].c_str()
|
|
||||||
- string_arr.size()
|
|
||||||
|
|
|
@ -1,63 +1 @@
|
||||||
esphome:
|
<<: !include common.yaml
|
||||||
on_boot:
|
|
||||||
then:
|
|
||||||
- homeassistant.event:
|
|
||||||
event: esphome.button_pressed
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.service:
|
|
||||||
service: notify.html5
|
|
||||||
data:
|
|
||||||
message: Button was pressed
|
|
||||||
- homeassistant.tag_scanned: pulse
|
|
||||||
|
|
||||||
wifi:
|
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
api:
|
|
||||||
port: 8000
|
|
||||||
password: pwd
|
|
||||||
reboot_timeout: 0min
|
|
||||||
encryption:
|
|
||||||
key: bOFFzzvfpg5DB94DuBGLXD/hMnhpDKgP9UQyBulwWVU=
|
|
||||||
services:
|
|
||||||
- service: hello_world
|
|
||||||
variables:
|
|
||||||
name: string
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
format: Hello World %s!
|
|
||||||
args:
|
|
||||||
- name.c_str()
|
|
||||||
- service: empty_service
|
|
||||||
then:
|
|
||||||
- logger.log: Service Called
|
|
||||||
- service: all_types
|
|
||||||
variables:
|
|
||||||
bool_: bool
|
|
||||||
int_: int
|
|
||||||
float_: float
|
|
||||||
string_: string
|
|
||||||
then:
|
|
||||||
- logger.log: Something happened
|
|
||||||
- service: array_types
|
|
||||||
variables:
|
|
||||||
bool_arr: bool[]
|
|
||||||
int_arr: int[]
|
|
||||||
float_arr: float[]
|
|
||||||
string_arr: string[]
|
|
||||||
then:
|
|
||||||
- logger.log:
|
|
||||||
# yamllint disable rule:line-length
|
|
||||||
format: "Bool: %s (%u), Int: %d (%u), Float: %f (%u), String: %s (%u)"
|
|
||||||
# yamllint enable rule:line-length
|
|
||||||
args:
|
|
||||||
- YESNO(bool_arr[0])
|
|
||||||
- bool_arr.size()
|
|
||||||
- int_arr[0]
|
|
||||||
- int_arr.size()
|
|
||||||
- float_arr[0]
|
|
||||||
- float_arr.size()
|
|
||||||
- string_arr[0].c_str()
|
|
||||||
- string_arr.size()
|
|
||||||
|
|
13
tests/components/atc_mithermometer/common.yaml
Normal file
13
tests/components/atc_mithermometer/common.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: atc_mithermometer
|
||||||
|
mac_address: A4:C1:38:4E:16:78
|
||||||
|
temperature:
|
||||||
|
name: ATC Temperature
|
||||||
|
humidity:
|
||||||
|
name: ATC Humidity
|
||||||
|
battery_level:
|
||||||
|
name: ATC Battery-Level
|
||||||
|
battery_voltage:
|
||||||
|
name: ATC Battery-Voltage
|
|
@ -1,13 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: atc_mithermometer
|
|
||||||
mac_address: A4:C1:38:4E:16:78
|
|
||||||
temperature:
|
|
||||||
name: ATC Temperature
|
|
||||||
humidity:
|
|
||||||
name: ATC Humidity
|
|
||||||
battery_level:
|
|
||||||
name: ATC Battery-Level
|
|
||||||
battery_voltage:
|
|
||||||
name: ATC Battery-Voltage
|
|
||||||
|
|
|
@ -1,13 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: atc_mithermometer
|
|
||||||
mac_address: A4:C1:38:4E:16:78
|
|
||||||
temperature:
|
|
||||||
name: ATC Temperature
|
|
||||||
humidity:
|
|
||||||
name: ATC Humidity
|
|
||||||
battery_level:
|
|
||||||
name: ATC Battery-Level
|
|
||||||
battery_voltage:
|
|
||||||
name: ATC Battery-Voltage
|
|
||||||
|
|
|
@ -1,13 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: atc_mithermometer
|
|
||||||
mac_address: A4:C1:38:4E:16:78
|
|
||||||
temperature:
|
|
||||||
name: ATC Temperature
|
|
||||||
humidity:
|
|
||||||
name: ATC Humidity
|
|
||||||
battery_level:
|
|
||||||
name: ATC Battery-Level
|
|
||||||
battery_voltage:
|
|
||||||
name: ATC Battery-Voltage
|
|
||||||
|
|
|
@ -1,13 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: atc_mithermometer
|
|
||||||
mac_address: A4:C1:38:4E:16:78
|
|
||||||
temperature:
|
|
||||||
name: ATC Temperature
|
|
||||||
humidity:
|
|
||||||
name: ATC Humidity
|
|
||||||
battery_level:
|
|
||||||
name: ATC Battery-Level
|
|
||||||
battery_voltage:
|
|
||||||
name: ATC Battery-Voltage
|
|
||||||
|
|
15
tests/components/b_parasite/common.yaml
Normal file
15
tests/components/b_parasite/common.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: b_parasite
|
||||||
|
mac_address: F0:CA:F0:CA:01:01
|
||||||
|
humidity:
|
||||||
|
name: b-parasite Air Humidity
|
||||||
|
temperature:
|
||||||
|
name: b-parasite Air Temperature
|
||||||
|
moisture:
|
||||||
|
name: b-parasite Soil Moisture
|
||||||
|
battery_voltage:
|
||||||
|
name: b-parasite Battery Voltage
|
||||||
|
illuminance:
|
||||||
|
name: b-parasite Illuminance
|
|
@ -1,15 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: b_parasite
|
|
||||||
mac_address: F0:CA:F0:CA:01:01
|
|
||||||
humidity:
|
|
||||||
name: b-parasite Air Humidity
|
|
||||||
temperature:
|
|
||||||
name: b-parasite Air Temperature
|
|
||||||
moisture:
|
|
||||||
name: b-parasite Soil Moisture
|
|
||||||
battery_voltage:
|
|
||||||
name: b-parasite Battery Voltage
|
|
||||||
illuminance:
|
|
||||||
name: b-parasite Illuminance
|
|
||||||
|
|
|
@ -1,15 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: b_parasite
|
|
||||||
mac_address: F0:CA:F0:CA:01:01
|
|
||||||
humidity:
|
|
||||||
name: b-parasite Air Humidity
|
|
||||||
temperature:
|
|
||||||
name: b-parasite Air Temperature
|
|
||||||
moisture:
|
|
||||||
name: b-parasite Soil Moisture
|
|
||||||
battery_voltage:
|
|
||||||
name: b-parasite Battery Voltage
|
|
||||||
illuminance:
|
|
||||||
name: b-parasite Illuminance
|
|
||||||
|
|
|
@ -1,15 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: b_parasite
|
|
||||||
mac_address: F0:CA:F0:CA:01:01
|
|
||||||
humidity:
|
|
||||||
name: b-parasite Air Humidity
|
|
||||||
temperature:
|
|
||||||
name: b-parasite Air Temperature
|
|
||||||
moisture:
|
|
||||||
name: b-parasite Soil Moisture
|
|
||||||
battery_voltage:
|
|
||||||
name: b-parasite Battery Voltage
|
|
||||||
illuminance:
|
|
||||||
name: b-parasite Illuminance
|
|
||||||
|
|
|
@ -1,15 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: b_parasite
|
|
||||||
mac_address: F0:CA:F0:CA:01:01
|
|
||||||
humidity:
|
|
||||||
name: b-parasite Air Humidity
|
|
||||||
temperature:
|
|
||||||
name: b-parasite Air Temperature
|
|
||||||
moisture:
|
|
||||||
name: b-parasite Soil Moisture
|
|
||||||
battery_voltage:
|
|
||||||
name: b-parasite Battery Voltage
|
|
||||||
illuminance:
|
|
||||||
name: b-parasite Illuminance
|
|
||||||
|
|
35
tests/components/bang_bang/common.yaml
Normal file
35
tests/components/bang_bang/common.yaml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
switch:
|
||||||
|
- platform: template
|
||||||
|
id: template_switch1
|
||||||
|
optimistic: true
|
||||||
|
- platform: template
|
||||||
|
id: template_switch2
|
||||||
|
optimistic: true
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: template
|
||||||
|
id: template_sensor1
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 10000) {
|
||||||
|
return 42.0;
|
||||||
|
} else {
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
|
climate:
|
||||||
|
- platform: bang_bang
|
||||||
|
name: Bang Bang Climate
|
||||||
|
sensor: template_sensor1
|
||||||
|
humidity_sensor: template_sensor1
|
||||||
|
default_target_temperature_low: 18°C
|
||||||
|
default_target_temperature_high: 24°C
|
||||||
|
idle_action:
|
||||||
|
- switch.turn_on: template_switch1
|
||||||
|
cool_action:
|
||||||
|
- switch.turn_on: template_switch2
|
||||||
|
heat_action:
|
||||||
|
- switch.turn_on: template_switch1
|
||||||
|
away_config:
|
||||||
|
default_target_temperature_low: 16°C
|
||||||
|
default_target_temperature_high: 20°C
|
|
@ -1,35 +1 @@
|
||||||
switch:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_switch1
|
|
||||||
optimistic: true
|
|
||||||
- platform: template
|
|
||||||
id: template_switch2
|
|
||||||
optimistic: true
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
id: template_sensor1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bang_bang
|
|
||||||
name: Bang Bang Climate
|
|
||||||
sensor: template_sensor1
|
|
||||||
humidity_sensor: template_sensor1
|
|
||||||
default_target_temperature_low: 18°C
|
|
||||||
default_target_temperature_high: 24°C
|
|
||||||
idle_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
cool_action:
|
|
||||||
- switch.turn_on: template_switch2
|
|
||||||
heat_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
away_config:
|
|
||||||
default_target_temperature_low: 16°C
|
|
||||||
default_target_temperature_high: 20°C
|
|
||||||
|
|
|
@ -1,35 +1 @@
|
||||||
switch:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_switch1
|
|
||||||
optimistic: true
|
|
||||||
- platform: template
|
|
||||||
id: template_switch2
|
|
||||||
optimistic: true
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
id: template_sensor1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bang_bang
|
|
||||||
name: Bang Bang Climate
|
|
||||||
sensor: template_sensor1
|
|
||||||
humidity_sensor: template_sensor1
|
|
||||||
default_target_temperature_low: 18°C
|
|
||||||
default_target_temperature_high: 24°C
|
|
||||||
idle_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
cool_action:
|
|
||||||
- switch.turn_on: template_switch2
|
|
||||||
heat_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
away_config:
|
|
||||||
default_target_temperature_low: 16°C
|
|
||||||
default_target_temperature_high: 20°C
|
|
||||||
|
|
|
@ -1,35 +1 @@
|
||||||
switch:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_switch1
|
|
||||||
optimistic: true
|
|
||||||
- platform: template
|
|
||||||
id: template_switch2
|
|
||||||
optimistic: true
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
id: template_sensor1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bang_bang
|
|
||||||
name: Bang Bang Climate
|
|
||||||
sensor: template_sensor1
|
|
||||||
humidity_sensor: template_sensor1
|
|
||||||
default_target_temperature_low: 18°C
|
|
||||||
default_target_temperature_high: 24°C
|
|
||||||
idle_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
cool_action:
|
|
||||||
- switch.turn_on: template_switch2
|
|
||||||
heat_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
away_config:
|
|
||||||
default_target_temperature_low: 16°C
|
|
||||||
default_target_temperature_high: 20°C
|
|
||||||
|
|
|
@ -1,35 +1 @@
|
||||||
switch:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_switch1
|
|
||||||
optimistic: true
|
|
||||||
- platform: template
|
|
||||||
id: template_switch2
|
|
||||||
optimistic: true
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
id: template_sensor1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bang_bang
|
|
||||||
name: Bang Bang Climate
|
|
||||||
sensor: template_sensor1
|
|
||||||
humidity_sensor: template_sensor1
|
|
||||||
default_target_temperature_low: 18°C
|
|
||||||
default_target_temperature_high: 24°C
|
|
||||||
idle_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
cool_action:
|
|
||||||
- switch.turn_on: template_switch2
|
|
||||||
heat_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
away_config:
|
|
||||||
default_target_temperature_low: 16°C
|
|
||||||
default_target_temperature_high: 20°C
|
|
||||||
|
|
|
@ -1,35 +1 @@
|
||||||
switch:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_switch1
|
|
||||||
optimistic: true
|
|
||||||
- platform: template
|
|
||||||
id: template_switch2
|
|
||||||
optimistic: true
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
id: template_sensor1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bang_bang
|
|
||||||
name: Bang Bang Climate
|
|
||||||
sensor: template_sensor1
|
|
||||||
humidity_sensor: template_sensor1
|
|
||||||
default_target_temperature_low: 18°C
|
|
||||||
default_target_temperature_high: 24°C
|
|
||||||
idle_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
cool_action:
|
|
||||||
- switch.turn_on: template_switch2
|
|
||||||
heat_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
away_config:
|
|
||||||
default_target_temperature_low: 16°C
|
|
||||||
default_target_temperature_high: 20°C
|
|
||||||
|
|
|
@ -1,35 +1 @@
|
||||||
switch:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: template_switch1
|
|
||||||
optimistic: true
|
|
||||||
- platform: template
|
|
||||||
id: template_switch2
|
|
||||||
optimistic: true
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: template
|
|
||||||
id: template_sensor1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return 42.0;
|
|
||||||
} else {
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
update_interval: 60s
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bang_bang
|
|
||||||
name: Bang Bang Climate
|
|
||||||
sensor: template_sensor1
|
|
||||||
humidity_sensor: template_sensor1
|
|
||||||
default_target_temperature_low: 18°C
|
|
||||||
default_target_temperature_high: 24°C
|
|
||||||
idle_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
cool_action:
|
|
||||||
- switch.turn_on: template_switch2
|
|
||||||
heat_action:
|
|
||||||
- switch.turn_on: template_switch1
|
|
||||||
away_config:
|
|
||||||
default_target_temperature_low: 16°C
|
|
||||||
default_target_temperature_high: 20°C
|
|
||||||
|
|
33
tests/components/bedjet/common.yaml
Normal file
33
tests/components/bedjet/common.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
wifi:
|
||||||
|
ssid: MySSID
|
||||||
|
password: password1
|
||||||
|
|
||||||
|
time:
|
||||||
|
- platform: sntp
|
||||||
|
id: sntp_time
|
||||||
|
servers:
|
||||||
|
- 0.pool.ntp.org
|
||||||
|
- 1.pool.ntp.org
|
||||||
|
- 192.168.178.1
|
||||||
|
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: bedjet_blec
|
||||||
|
|
||||||
|
bedjet:
|
||||||
|
- id: bedjet_hub
|
||||||
|
ble_client_id: bedjet_blec
|
||||||
|
time_id: sntp_time
|
||||||
|
|
||||||
|
climate:
|
||||||
|
- platform: bedjet
|
||||||
|
name: My Bedjet
|
||||||
|
bedjet_id: bedjet_hub
|
||||||
|
heat_mode: extended
|
||||||
|
|
||||||
|
fan:
|
||||||
|
- platform: bedjet
|
||||||
|
name: My Bedjet fan
|
||||||
|
bedjet_id: bedjet_hub
|
|
@ -1,33 +1 @@
|
||||||
wifi:
|
<<: !include common.yaml
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
time:
|
|
||||||
- platform: sntp
|
|
||||||
id: sntp_time
|
|
||||||
servers:
|
|
||||||
- 0.pool.ntp.org
|
|
||||||
- 1.pool.ntp.org
|
|
||||||
- 192.168.178.1
|
|
||||||
|
|
||||||
esp32_ble_tracker:
|
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: bedjet_blec
|
|
||||||
|
|
||||||
bedjet:
|
|
||||||
- id: bedjet_hub
|
|
||||||
ble_client_id: bedjet_blec
|
|
||||||
time_id: sntp_time
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
heat_mode: extended
|
|
||||||
|
|
||||||
fan:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet fan
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
|
|
|
@ -1,33 +1 @@
|
||||||
wifi:
|
<<: !include common.yaml
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
time:
|
|
||||||
- platform: sntp
|
|
||||||
id: sntp_time
|
|
||||||
servers:
|
|
||||||
- 0.pool.ntp.org
|
|
||||||
- 1.pool.ntp.org
|
|
||||||
- 192.168.178.1
|
|
||||||
|
|
||||||
esp32_ble_tracker:
|
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: bedjet_blec
|
|
||||||
|
|
||||||
bedjet:
|
|
||||||
- id: bedjet_hub
|
|
||||||
ble_client_id: bedjet_blec
|
|
||||||
time_id: sntp_time
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
heat_mode: extended
|
|
||||||
|
|
||||||
fan:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet fan
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
|
|
|
@ -1,33 +1 @@
|
||||||
wifi:
|
<<: !include common.yaml
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
time:
|
|
||||||
- platform: sntp
|
|
||||||
id: sntp_time
|
|
||||||
servers:
|
|
||||||
- 0.pool.ntp.org
|
|
||||||
- 1.pool.ntp.org
|
|
||||||
- 192.168.178.1
|
|
||||||
|
|
||||||
esp32_ble_tracker:
|
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: bedjet_blec
|
|
||||||
|
|
||||||
bedjet:
|
|
||||||
- id: bedjet_hub
|
|
||||||
ble_client_id: bedjet_blec
|
|
||||||
time_id: sntp_time
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
heat_mode: extended
|
|
||||||
|
|
||||||
fan:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet fan
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
|
|
|
@ -1,33 +1 @@
|
||||||
wifi:
|
<<: !include common.yaml
|
||||||
ssid: MySSID
|
|
||||||
password: password1
|
|
||||||
|
|
||||||
time:
|
|
||||||
- platform: sntp
|
|
||||||
id: sntp_time
|
|
||||||
servers:
|
|
||||||
- 0.pool.ntp.org
|
|
||||||
- 1.pool.ntp.org
|
|
||||||
- 192.168.178.1
|
|
||||||
|
|
||||||
esp32_ble_tracker:
|
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: bedjet_blec
|
|
||||||
|
|
||||||
bedjet:
|
|
||||||
- id: bedjet_hub
|
|
||||||
ble_client_id: bedjet_blec
|
|
||||||
time_id: sntp_time
|
|
||||||
|
|
||||||
climate:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
heat_mode: extended
|
|
||||||
|
|
||||||
fan:
|
|
||||||
- platform: bedjet
|
|
||||||
name: My Bedjet fan
|
|
||||||
bedjet_id: bedjet_hub
|
|
||||||
|
|
61
tests/components/binary_sensor_map/common.yaml
Normal file
61
tests/components/binary_sensor_map/common.yaml
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
binary_sensor:
|
||||||
|
- platform: template
|
||||||
|
id: bin1
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 10000) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
- platform: template
|
||||||
|
id: bin2
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 20000) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
- platform: template
|
||||||
|
id: bin3
|
||||||
|
lambda: |-
|
||||||
|
if (millis() > 30000) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: binary_sensor_map
|
||||||
|
name: Binary Sensor Map
|
||||||
|
type: group
|
||||||
|
channels:
|
||||||
|
- binary_sensor: bin1
|
||||||
|
value: 10.0
|
||||||
|
- binary_sensor: bin2
|
||||||
|
value: 15.0
|
||||||
|
- binary_sensor: bin3
|
||||||
|
value: 100.0
|
||||||
|
- platform: binary_sensor_map
|
||||||
|
name: Binary Sensor Map
|
||||||
|
type: sum
|
||||||
|
channels:
|
||||||
|
- binary_sensor: bin1
|
||||||
|
value: 10.0
|
||||||
|
- binary_sensor: bin2
|
||||||
|
value: 15.0
|
||||||
|
- binary_sensor: bin3
|
||||||
|
value: 100.0
|
||||||
|
- platform: binary_sensor_map
|
||||||
|
name: Binary Sensor Map
|
||||||
|
type: bayesian
|
||||||
|
prior: 0.4
|
||||||
|
observations:
|
||||||
|
- binary_sensor: bin1
|
||||||
|
prob_given_true: 0.9
|
||||||
|
prob_given_false: 0.4
|
||||||
|
- binary_sensor: bin2
|
||||||
|
prob_given_true: 0.7
|
||||||
|
prob_given_false: 0.05
|
||||||
|
- binary_sensor: bin3
|
||||||
|
prob_given_true: 0.8
|
||||||
|
prob_given_false: 0.2
|
|
@ -1,61 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: bin1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin2
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 20000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin3
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 30000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: group
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: sum
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: bayesian
|
|
||||||
prior: 0.4
|
|
||||||
observations:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
prob_given_true: 0.9
|
|
||||||
prob_given_false: 0.4
|
|
||||||
- binary_sensor: bin2
|
|
||||||
prob_given_true: 0.7
|
|
||||||
prob_given_false: 0.05
|
|
||||||
- binary_sensor: bin3
|
|
||||||
prob_given_true: 0.8
|
|
||||||
prob_given_false: 0.2
|
|
||||||
|
|
|
@ -1,61 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: bin1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin2
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 20000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin3
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 30000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: group
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: sum
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: bayesian
|
|
||||||
prior: 0.4
|
|
||||||
observations:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
prob_given_true: 0.9
|
|
||||||
prob_given_false: 0.4
|
|
||||||
- binary_sensor: bin2
|
|
||||||
prob_given_true: 0.7
|
|
||||||
prob_given_false: 0.05
|
|
||||||
- binary_sensor: bin3
|
|
||||||
prob_given_true: 0.8
|
|
||||||
prob_given_false: 0.2
|
|
||||||
|
|
|
@ -1,61 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: bin1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin2
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 20000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin3
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 30000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: group
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: sum
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: bayesian
|
|
||||||
prior: 0.4
|
|
||||||
observations:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
prob_given_true: 0.9
|
|
||||||
prob_given_false: 0.4
|
|
||||||
- binary_sensor: bin2
|
|
||||||
prob_given_true: 0.7
|
|
||||||
prob_given_false: 0.05
|
|
||||||
- binary_sensor: bin3
|
|
||||||
prob_given_true: 0.8
|
|
||||||
prob_given_false: 0.2
|
|
||||||
|
|
|
@ -1,61 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: bin1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin2
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 20000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin3
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 30000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: group
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: sum
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: bayesian
|
|
||||||
prior: 0.4
|
|
||||||
observations:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
prob_given_true: 0.9
|
|
||||||
prob_given_false: 0.4
|
|
||||||
- binary_sensor: bin2
|
|
||||||
prob_given_true: 0.7
|
|
||||||
prob_given_false: 0.05
|
|
||||||
- binary_sensor: bin3
|
|
||||||
prob_given_true: 0.8
|
|
||||||
prob_given_false: 0.2
|
|
||||||
|
|
|
@ -1,61 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: bin1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin2
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 20000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin3
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 30000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: group
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: sum
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: bayesian
|
|
||||||
prior: 0.4
|
|
||||||
observations:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
prob_given_true: 0.9
|
|
||||||
prob_given_false: 0.4
|
|
||||||
- binary_sensor: bin2
|
|
||||||
prob_given_true: 0.7
|
|
||||||
prob_given_false: 0.05
|
|
||||||
- binary_sensor: bin3
|
|
||||||
prob_given_true: 0.8
|
|
||||||
prob_given_false: 0.2
|
|
||||||
|
|
|
@ -1,61 +1 @@
|
||||||
binary_sensor:
|
<<: !include common.yaml
|
||||||
- platform: template
|
|
||||||
id: bin1
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 10000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin2
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 20000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
- platform: template
|
|
||||||
id: bin3
|
|
||||||
lambda: |-
|
|
||||||
if (millis() > 30000) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sensor:
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: group
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: sum
|
|
||||||
channels:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
value: 10.0
|
|
||||||
- binary_sensor: bin2
|
|
||||||
value: 15.0
|
|
||||||
- binary_sensor: bin3
|
|
||||||
value: 100.0
|
|
||||||
- platform: binary_sensor_map
|
|
||||||
name: Binary Sensor Map
|
|
||||||
type: bayesian
|
|
||||||
prior: 0.4
|
|
||||||
observations:
|
|
||||||
- binary_sensor: bin1
|
|
||||||
prob_given_true: 0.9
|
|
||||||
prob_given_false: 0.4
|
|
||||||
- binary_sensor: bin2
|
|
||||||
prob_given_true: 0.7
|
|
||||||
prob_given_false: 0.05
|
|
||||||
- binary_sensor: bin3
|
|
||||||
prob_given_true: 0.8
|
|
||||||
prob_given_false: 0.2
|
|
||||||
|
|
5
tests/components/ble_client/common.yaml
Normal file
5
tests/components/ble_client/common.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
esp32_ble_tracker:
|
||||||
|
|
||||||
|
ble_client:
|
||||||
|
- mac_address: 01:02:03:04:05:06
|
||||||
|
id: test_blec
|
|
@ -1,5 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: test_blec
|
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
esp32_ble_tracker:
|
<<: !include common.yaml
|
||||||
|
|
||||||
ble_client:
|
|
||||||
- mac_address: 01:02:03:04:05:06
|
|
||||||
id: test_blec
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue