esphome/tests/test2.yaml

350 lines
8.5 KiB
YAML
Raw Normal View History

esphome:
[Huge] Util Refactor, Dashboard Improvements, Hass.io Auth API, Better Validation Errors, Conditions, Custom Platforms, Substitutions (#234) * Implement custom sensor platform * Update * Ethernet * Lint * Fix * Login page * Rename cookie secret * Update manifest * Update cookie check logic * Favicon * Fix * Favicon manifest * Fix * Fix * Fix * Use hostname * Message * Temporary commit for screenshot * Automatic board selection * Undo temporary commit * Update esphomeyaml-edge * In-dashboard editing and hosting files locally * Update esphomeyaml-edge * Better ANSI color escaping * Message * Lint * Download Efficiency * Fix gitlab * Fix * Rename extra_libraries to libraries * Add example * Update README.md * Update README.md * Update README.md * HassIO -> Hass.io * Updates * Add update available notice * Update * Fix substitutions * Better error message * Re-do dashboard ANSI colors * Only include FastLED if user says so * Autoscroll logs * Remove old checks * Use safer RedirectText * Improvements * Fix * Use enviornment variable * Use http://hassio/host/info * Fix conditions * Update platformio versions * Revert "Use enviornment variable" This reverts commit 7f038eb5d26df72f76ea9ae76774e2cec1fd7f59. * Fix * README update * Temp * Better invalid config messages * Platformio debug * Improve error messages * Debug * Remove debug * Multi Conf * Update * Better paths * Remove unused * Fixes * Lint * lib_ignore * Try fix platformio colors * Fix dashboard scrolling * Revert * Lint * Revert
2018-12-05 21:22:06 +01:00
name: $devicename
2018-09-26 18:39:41 +02:00
platform: ESP32
board: nodemcu-32s
build_path: build/test2
[Huge] Util Refactor, Dashboard Improvements, Hass.io Auth API, Better Validation Errors, Conditions, Custom Platforms, Substitutions (#234) * Implement custom sensor platform * Update * Ethernet * Lint * Fix * Login page * Rename cookie secret * Update manifest * Update cookie check logic * Favicon * Fix * Favicon manifest * Fix * Fix * Fix * Use hostname * Message * Temporary commit for screenshot * Automatic board selection * Undo temporary commit * Update esphomeyaml-edge * In-dashboard editing and hosting files locally * Update esphomeyaml-edge * Better ANSI color escaping * Message * Lint * Download Efficiency * Fix gitlab * Fix * Rename extra_libraries to libraries * Add example * Update README.md * Update README.md * Update README.md * HassIO -> Hass.io * Updates * Add update available notice * Update * Fix substitutions * Better error message * Re-do dashboard ANSI colors * Only include FastLED if user says so * Autoscroll logs * Remove old checks * Use safer RedirectText * Improvements * Fix * Use enviornment variable * Use http://hassio/host/info * Fix conditions * Update platformio versions * Revert "Use enviornment variable" This reverts commit 7f038eb5d26df72f76ea9ae76774e2cec1fd7f59. * Fix * README update * Temp * Better invalid config messages * Platformio debug * Improve error messages * Debug * Remove debug * Multi Conf * Update * Better paths * Remove unused * Fixes * Lint * lib_ignore * Try fix platformio colors * Fix dashboard scrolling * Revert * Lint * Revert
2018-12-05 21:22:06 +01:00
substitutions:
devicename: test2
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO25
clk_mode: GPIO0_IN
phy_addr: 0
power_pin: GPIO25
manual_ip:
static_ip: 192.168.178.56
gateway: 192.168.178.1
subnet: 255.255.255.0
domain: .local
2018-09-26 18:39:41 +02:00
2019-01-06 19:03:34 +01:00
api:
2018-09-26 18:39:41 +02:00
i2c:
sda: 21
scl: 22
scan: False
spi:
clk_pin: GPIO21
mosi_pin: GPIO22
miso_pin: GPIO23
uart:
tx_pin: GPIO22
rx_pin: GPIO23
baud_rate: 115200
ota:
safe_mode: True
port: 3286
logger:
level: DEBUG
as3935_i2c:
irq_pin: GPIO12
2018-09-26 18:39:41 +02:00
sensor:
- platform: homeassistant
entity_id: sensor.hello_world
id: ha_hello_world
2018-09-26 18:39:41 +02:00
- platform: ble_rssi
mac_address: AC:37:43:77:5F:4C
name: "BLE Google Home Mini RSSI value"
- platform: ble_rssi
service_uuid: '11aa'
name: "BLE Test Service 16"
- platform: ble_rssi
service_uuid: '11223344'
name: "BLE Test Service 32"
- platform: ble_rssi
service_uuid: '11223344-5566-7788-99aa-bbccddeeff00'
name: "BLE Test Service 128"
- platform: ruuvitag
mac_address: FF:56:D3:2F:7D:E8
humidity:
name: "RuuviTag Humidity"
temperature:
name: "RuuviTag Temperature"
pressure:
name: "RuuviTag Pressure"
acceleration_x:
name: "RuuviTag Acceleration X"
acceleration_y:
name: "RuuviTag Acceleration Y"
acceleration_z:
name: "RuuviTag Acceleration Z"
battery_voltage:
name: "RuuviTag Battery Voltage"
tx_power:
name: "RuuviTag TX Power"
movement_counter:
name: "RuuviTag Movement Counter"
measurement_sequence_number:
name: "RuuviTag Measurement Sequence Number"
- platform: as3935
lightning_energy:
name: "Lightning Energy"
distance:
name: "Distance Storm"
- platform: xiaomi_hhccjcy01
2018-09-26 18:39:41 +02:00
mac_address: 94:2B:FF:5C:91:61
temperature:
name: "Xiaomi HHCCJCY01 Temperature"
2018-09-26 18:39:41 +02:00
moisture:
name: "Xiaomi HHCCJCY01 Moisture"
2018-09-26 18:39:41 +02:00
illuminance:
name: "Xiaomi HHCCJCY01 Illuminance"
2018-09-26 18:39:41 +02:00
conductivity:
name: "Xiaomi HHCCJCY01 Soil Conductivity"
battery_level:
name: "Xiaomi HHCCJCY01 Battery Level"
- platform: xiaomi_lywsdcgq
2018-09-26 18:39:41 +02:00
mac_address: 7A:80:8E:19:36:BA
temperature:
name: "Xiaomi LYWSDCGQ Temperature"
2018-09-26 18:39:41 +02:00
humidity:
name: "Xiaomi LYWSDCGQ Humidity"
2018-09-26 18:39:41 +02:00
battery_level:
name: "Xiaomi LYWSDCGQ Battery Level"
- platform: xiaomi_lywsd02
mac_address: 3F:5B:7D:82:58:4E
temperature:
name: "Xiaomi LYWSD02 Temperature"
humidity:
name: "Xiaomi LYWSD02 Humidity"
battery_level:
name: "Xiaomi LYWSD02 Battery Level"
- platform: xiaomi_cgg1
mac_address: 7A:80:8E:19:36:BA
temperature:
name: "Xiaomi CGG1 Temperature"
humidity:
name: "Xiaomi CGG1 Humidity"
battery_level:
name: "Xiaomi CGG1 Battery Level"
- platform: xiaomi_gcls002
mac_address: "94:2B:FF:5C:91:61"
temperature:
name: "GCLS02 Temperature"
moisture:
name: "GCLS02 Moisture"
conductivity:
name: "GCLS02 Soil Conductivity"
illuminance:
name: "GCLS02 Illuminance"
- platform: xiaomi_hhccpot002
mac_address: "94:2B:FF:5C:91:61"
moisture:
name: "HHCCPOT002 Moisture"
conductivity:
name: "HHCCPOT002 Soil Conductivity"
- platform: xiaomi_lywsd03mmc
mac_address: "A4:C1:38:4E:16:78"
bindkey: "e9efaa6873f9f9c87a5e75a5f814801c"
temperature:
name: "Xiaomi LYWSD03MMC Temperature"
humidity:
name: "Xiaomi LYWSD03MMC Humidity"
battery_level:
name: "Xiaomi LYWSD03MMC Battery Level"
- platform: xiaomi_cgd1
mac_address: "A4:C1:38:D1:61:7D"
bindkey: "c99d2313182473b38001086febf781bd"
temperature:
name: "Xiaomi CGD1 Temperature"
humidity:
name: "Xiaomi CGD1 Humidity"
battery_level:
name: "Xiaomi CGD1 Battery Level"
- platform: xiaomi_jqjcy01ym
mac_address: "7A:80:8E:19:36:BA"
temperature:
name: "JQJCY01YM Temperature"
humidity:
name: "JQJCY01YM Humidity"
formaldehyde:
name: "JQJCY01YM Formaldehyde"
battery_level:
name: "JQJCY01YM Battery Level"
Add support for ATC_MiThermometer (#1291) * Add support for additional Xiaomi BLE sensors (#1027) * Revert "Add support for additional Xiaomi BLE sensors (#1027)" This reverts commit b2723830f4ed1e29611e3688a2c9323c1071bc23. * initial ATC Mithermometer component * removed references to xiaomi_ble * temp, humi and batt in % working, todo: battery in mV * report battery level in volt * report battery level again in percent * Add files via upload * add ATC Mithermometer component * remove some comments * fix travis ci build issues * mark codeowner, make functions protected * add newlines, remove spaces * two lines after function or class definition * update codeowners * Bump flake8 from 3.8.3 to 3.8.4 Bumps [flake8](https://gitlab.com/pycqa/flake8) from 3.8.3 to 3.8.4. - [Release notes](https://gitlab.com/pycqa/flake8/tags) - [Commits](https://gitlab.com/pycqa/flake8/compare/3.8.3...3.8.4) Signed-off-by: dependabot[bot] <support@github.com> * Add files via upload * Bump pytest from 6.0.2 to 6.1.1 Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.2 to 6.1.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/6.0.2...6.1.1) Signed-off-by: dependabot[bot] <support@github.com> * add ATC battery voltage to test2.yaml * fix lint-python * Bump colorlog from 4.2.1 to 4.4.0 Bumps [colorlog](https://github.com/borntyping/python-colorlog) from 4.2.1 to 4.4.0. - [Release notes](https://github.com/borntyping/python-colorlog/releases) - [Commits](https://github.com/borntyping/python-colorlog/compare/v4.2.1...v4.4.0) Signed-off-by: dependabot[bot] <support@github.com> * Bump voluptuous from 0.11.7 to 0.12.0 Bumps [voluptuous](https://github.com/alecthomas/voluptuous) from 0.11.7 to 0.12.0. - [Release notes](https://github.com/alecthomas/voluptuous/releases) - [Changelog](https://github.com/alecthomas/voluptuous/blob/master/CHANGELOG.md) - [Commits](https://github.com/alecthomas/voluptuous/commits/v0.12.0) Signed-off-by: dependabot[bot] <support@github.com> * restore requirements * move codeowner above dependencies * Revert "restore requirements" This reverts commit 3c9fd8b42183ff251c68404ae5e75d72ded00006. * Revert "Bump voluptuous from 0.11.7 to 0.12.0" This reverts commit 8eb0dba1c3f2fdcad28f6970381021a04a4051e7. * Revert "Bump flake8 from 3.8.3 to 3.8.4" This reverts commit 20952632dba032f70b97c86cac5daa84521c1840. * Revert "Bump colorlog from 4.2.1 to 4.4.0" This reverts commit 87bbf95d860a3213e5c9a909cbf6325f00e9094e. * Revert "Bump pytest from 6.0.2 to 6.1.1" This reverts commit 1b6ed8043137d8e8f38de32824cfa113dbc5a0ec. Co-authored-by: vevsvevs <v-v@mail.ru> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-03 18:36:11 +01:00
- 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"
2019-01-06 19:03:34 +01:00
time:
- platform: homeassistant
on_time:
- at: '16:00:00'
then:
- logger.log: It's 16:00
2019-01-05 19:52:01 +01:00
2018-09-26 18:39:41 +02:00
esp32_touch:
setup_mode: True
binary_sensor:
- platform: homeassistant
entity_id: binary_sensor.hello_world
id: ha_hello_world_binary
🏗 Merge C++ into python codebase (#504) ## Description: Move esphome-core codebase into esphome (and a bunch of other refactors). See https://github.com/esphome/feature-requests/issues/97 Yes this is a shit ton of work and no there's no way to automate it :( But it will be worth it 👍 Progress: - Core support (file copy etc): 80% - Base Abstractions (light, switch): ~50% - Integrations: ~10% - Working? Yes, (but only with ported components). Other refactors: - Moves all codegen related stuff into a single class: `esphome.codegen` (imported as `cg`) - Rework coroutine syntax - Move from `component/platform.py` to `domain/component.py` structure as with HA - Move all defaults out of C++ and into config validation. - Remove `make_...` helpers from Application class. Reason: Merge conflicts with every single new integration. - Pointer Variables are stored globally instead of locally in setup(). Reason: stack size limit. Future work: - Rework const.py - Move all `CONF_...` into a conf class (usage `conf.UPDATE_INTERVAL` vs `CONF_UPDATE_INTERVAL`). Reason: Less convoluted import block - Enable loading from `custom_components` folder. **Related issue (if applicable):** https://github.com/esphome/feature-requests/issues/97 **Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here> ## Checklist: - [ ] The code change is tested and works locally. - [ ] Tests have been added to verify that the new code works (under `tests/` folder). If user exposed functionality or configuration variables are added/changed: - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-17 12:06:00 +02:00
- platform: ble_presence
2018-09-26 18:39:41 +02:00
mac_address: AC:37:43:77:5F:4C
name: "ESP32 BLE Tracker Google Home Mini"
- platform: ble_presence
service_uuid: '11aa'
name: "BLE Test Service 16 Presence"
- platform: ble_presence
service_uuid: '11223344'
name: "BLE Test Service 32 Presence"
- platform: ble_presence
service_uuid: '11223344-5566-7788-99aa-bbccddeeff00'
name: "BLE Test Service 128 Presence"
2018-09-26 18:39:41 +02:00
- platform: esp32_touch
name: "ESP32 Touch Pad GPIO27"
pin: GPIO27
threshold: 1000
2019-10-12 17:03:01 +02:00
- platform: as3935
name: "Storm Alert"
- platform: xiaomi_mue4094rt
name: "MUE4094RT Motion"
mac_address: "7A:80:8E:19:36:BA"
timeout: "5s"
- platform: xiaomi_mjyd02yla
name: "MJYD02YL-A Motion"
mac_address: "50:EC:50:CD:32:02"
bindkey: "48403ebe2d385db8d0c187f81e62cb64"
idle_time:
name: "MJYD02YL-A Idle Time"
light:
name: "MJYD02YL-A Light Status"
battery_level:
name: "MJYD02YL-A Battery Level"
- platform: xiaomi_wx08zm
name: "WX08ZM Activation State"
mac_address: "74:a3:4a:b5:07:34"
tablet:
name: "WX08ZM Tablet Resource"
battery_level:
name: "WX08ZM Battery Level"
2018-09-26 18:39:41 +02:00
esp32_ble_tracker:
on_ble_advertise:
- mac_address: AC:37:43:77:5F:4C
then:
- lambda: !lambda |-
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
- then:
- lambda: !lambda |-
ESP_LOGD("main", "The device address is %s", x.address_str().c_str());
on_ble_service_data_advertise:
- service_uuid: ABCD
then:
- lambda: !lambda |-
ESP_LOGD("main", "Length of service data is %i", x.size());
on_ble_manufacturer_data_advertise:
- manufacturer_id: ABCD
then:
- lambda: !lambda |-
ESP_LOGD("main", "Length of manufacturer data is %i", x.size());
2018-09-26 18:39:41 +02:00
#esp32_ble_beacon:
# type: iBeacon
# uuid: 'c29ce823-e67a-4e71-bff2-abaa32e77a98'
2018-09-26 18:39:41 +02:00
status_led:
pin: GPIO2
text_sensor:
- platform: version
name: "ESPHome Version"
icon: mdi:icon
id: version_sensor
on_value:
- if:
condition:
- api.connected:
then:
- lambda: !lambda |-
ESP_LOGD("main", "The state is %s=%s", x.c_str(), id(version_sensor).state.c_str());
- script.execute: my_script
2019-01-14 11:09:32 +01:00
- homeassistant.service:
service: notify.html5
data:
title: New Humidity
data_template:
message: The humidity is {{ my_variable }}%.
variables:
my_variable: |-
return id(version_sensor).state;
🏗 Merge C++ into python codebase (#504) ## Description: Move esphome-core codebase into esphome (and a bunch of other refactors). See https://github.com/esphome/feature-requests/issues/97 Yes this is a shit ton of work and no there's no way to automate it :( But it will be worth it 👍 Progress: - Core support (file copy etc): 80% - Base Abstractions (light, switch): ~50% - Integrations: ~10% - Working? Yes, (but only with ported components). Other refactors: - Moves all codegen related stuff into a single class: `esphome.codegen` (imported as `cg`) - Rework coroutine syntax - Move from `component/platform.py` to `domain/component.py` structure as with HA - Move all defaults out of C++ and into config validation. - Remove `make_...` helpers from Application class. Reason: Merge conflicts with every single new integration. - Pointer Variables are stored globally instead of locally in setup(). Reason: stack size limit. Future work: - Rework const.py - Move all `CONF_...` into a conf class (usage `conf.UPDATE_INTERVAL` vs `CONF_UPDATE_INTERVAL`). Reason: Less convoluted import block - Enable loading from `custom_components` folder. **Related issue (if applicable):** https://github.com/esphome/feature-requests/issues/97 **Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#<esphome-docs PR number goes here> ## Checklist: - [ ] The code change is tested and works locally. - [ ] Tests have been added to verify that the new code works (under `tests/` folder). If user exposed functionality or configuration variables are added/changed: - [ ] Documentation added/updated in [esphomedocs](https://github.com/OttoWinter/esphomedocs).
2019-04-17 12:06:00 +02:00
my_variable_str: |-
return "Hello World";
- homeassistant.service:
service: light.turn_on
data:
entity_id: light.my_light
- homeassistant.tag_scanned:
tag: 1234-abcd
- homeassistant.tag_scanned: 1234-abcd
- platform: template
name: "Template Text Sensor"
lambda: |-
return {"Hello World"};
2019-01-06 19:03:34 +01:00
- platform: homeassistant
entity_id: sensor.hello_world2
id: ha_hello_world2
- platform: ble_scanner
name: Scanner
script:
- id: my_script
2020-08-06 17:08:48 +02:00
mode: single
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
- id: my_script_queued
mode: queued
max_runs: 2
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
- id: my_script_parallel
mode: parallel
max_runs: 2
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
- id: my_script_restart
mode: restart
then:
- lambda: 'ESP_LOGD("main", "Hello World!");'
2019-01-06 19:03:34 +01:00
stepper:
- platform: uln2003
id: my_stepper
pin_a: GPIO23
pin_b: GPIO27
2019-01-06 19:03:34 +01:00
pin_c: GPIO25
pin_d: GPIO26
sleep_when_done: no
step_mode: HALF_STEP
max_speed: 250 steps/s
# Optional:
acceleration: inf
deceleration: inf
2019-01-09 15:18:54 +01:00
interval:
interval: 5s
then:
- logger.log: "Interval Run"
display: