Repository navigation
Automatically turn display on and off - with exceptions #269
|
I configured Touchkio and it nicely displays my dashboard. But it stayed always on. So I used raspi-config to add screen blanking and .config/labwc/autostart to configure a blank after 60 seconds. It works as expected. Now there are two conditions when I do not want the screen to blank at all:
Both events might come from Homeassistant - but how can they be actioned? Does touchkio provide a setting like 'keep screen on' as media players do? Edit: I see that touchkio offers a homeassistant entity to turn the display on/off. It would be cool to have some on/auto/off with auto adhering to a configurable timeout. Then all I had to do were to switch between on and auto. |
Replies: 1 comment 1 reply
|
You can get the on/auto behaviour today by moving the blanking from labwc into Home Assistant. TouchKio publishes two entities over MQTT that are enough for this:
First remove the Then let an automation do the blanking with your exceptions as conditions: alias: Kiosk screen blanking
triggers:
- trigger: numeric_state
entity_id: sensor.touchkio_last_active
above: 1
conditions:
- condition: not
conditions:
- condition: time
after: "06:00:00"
before: "08:00:00"
- condition: state
entity_id: binary_sensor.excess_solar
state: "off"
actions:
- action: light.turn_off
target:
entity_id: light.touchkio_displayThe entity ids depend on your device name, and Last Active counts whole minutes, so this blanks after about a minute of no touches rather than exactly 60 seconds. Set |
You can get the on/auto behaviour today by moving the blanking from labwc into Home Assistant. TouchKio publishes two entities over MQTT that are enough for this:
lightentity, so you can turn the screen on and off (and set brightness if your panel supports it).First remove the
swayidle ... wlopmline from~/.config/labwc/autostart. The README mentions that once TouchKio turns the display back on,swayidlestill thinks it's off and won't blank it again until there's some interaction, so the two end up fighting each other.Then let an automation do the blanking with your exceptions as conditions: