mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 14:16:47 +00:00
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: J. Nick Koston <nick@koston.org> Co-authored-by: J. Nick Koston <nick@home-assistant.io>
26 lines
464 B
YAML
26 lines
464 B
YAML
button:
|
|
- platform: template
|
|
name: Send command test
|
|
on_press:
|
|
- emontx.send_command:
|
|
id: test_emontx
|
|
command: "v"
|
|
|
|
emontx:
|
|
id: test_emontx
|
|
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
|