Add backlight toggling to Home Assistant

This commit is contained in:
Nik Rozman
2022-10-25 21:06:11 +02:00
parent 37649244f8
commit f4294ee463
2 changed files with 16 additions and 1 deletions

View File

@@ -18,4 +18,7 @@ sensor:
pressure:
value_template: '{{ states.sensor.weather_sensor.attributes["pressure"] | round(2)}}'
friendly_name: Pressure soba
unit_of_measurement: "hPa"
unit_of_measurement: "hPa"
shell_command:
toggle_backlight: /bin/bash -c "echo -n -e 'T' >> /dev/ttyV0"

View File

@@ -0,0 +1,12 @@
show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: shell_command.toggle_backlight
entity: sensor.weather_sensor
name: Toggle backlight
show_state: false
hold_action:
action: more-info
icon: mdi:lightbulb