Added GPIO output pin that periodically presses the power key of the PSU to prevent poweroff.
This commit is contained in:
parent
09fb8c71ed
commit
72b91cebcb
@ -35,6 +35,16 @@ api:
|
|||||||
ota:
|
ota:
|
||||||
password: !secret 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
|
# Refresh screen on button click
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
@ -176,6 +186,15 @@ time:
|
|||||||
- platform: homeassistant
|
- platform: homeassistant
|
||||||
id: homeassistant_time
|
id: homeassistant_time
|
||||||
on_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
|
# Every 5 minutes
|
||||||
- seconds: 0
|
- seconds: 0
|
||||||
minutes: /10
|
minutes: /10
|
||||||
|
Loading…
Reference in New Issue
Block a user