Files
homeassistant_config/config/01capteur/switch/moonraker.yaml.old2
2024-05-31 09:39:52 +02:00

9 lines
345 B
Plaintext

- platform: rest
name: u20_V0_power
resource: "http://10.0.0.194:7125/machine/device_power/device?device=Printer"
body_on: '{"action": "on"}'
body_off: '{"action": "off"}'
headers:
Content-Type: 'application/json'
is_on_template: >-
{{ 'result' in value_json and (value_json.result.values() | list | first == "on") }}