Files
esphome/tests/components/emontx/common.yaml

27 lines
487 B
YAML

button:
- platform: template
name: Send command test
on_press:
- emontx.send_command:
id: test_emontx
command: "v"
emontx:
id: test_emontx
lock_on_reboot: true
on_json:
- then:
- logger.log: "Got JSON"
on_data:
- then:
- logger.log:
format: "Got data: %s"
args: [data.c_str()]
sensor:
- platform: emontx
name: Power
tag_name: P1
emontx_id: test_emontx
unit_of_measurement: W