Added GPIO output pin that periodically presses the power key of the PSU to prevent poweroff.

This commit is contained in:
Marcus Scholz 2022-04-04 21:16:22 +02:00
parent 09fb8c71ed
commit 72b91cebcb

View File

@ -35,6 +35,16 @@ api:
ota:
password: !secret ota
# Power key of li-ion charger
output:
- platform: gpio
pin:
number: GPIO15
inverted: true
mode:
output: true
id: power_key
# Refresh screen on button click
binary_sensor:
- platform: gpio
@ -176,6 +186,15 @@ time:
- platform: homeassistant
id: homeassistant_time
on_time:
# Every 10 seconds
- seconds: /10
then:
- logger.log:
level: INFO
format: 'Power button press'
- output.turn_on: power_key
- delay: 0.5s
- output.turn_off: power_key
# Every 5 minutes
- seconds: 0
minutes: /10