mirror of
https://github.com/michivonah/esphome-eink-dashboard.git
synced 2025-12-22 21:16:28 +01:00
only refresh screen when lux higher than 5
This commit is contained in:
parent
055baedf38
commit
5f1553a265
2 changed files with 9 additions and 2 deletions
|
|
@ -168,7 +168,9 @@ time:
|
|||
then:
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: presence_detected
|
||||
all:
|
||||
- binary_sensor.is_on: presence_detected
|
||||
- lambda: 'return id(presence_lux).state > 5;'
|
||||
then:
|
||||
- logger.log: "Sensor data updated and activity in home detected: Refreshing display..."
|
||||
- script.execute: update_screen
|
||||
|
|
@ -208,6 +210,11 @@ sensor:
|
|||
entity_category: "diagnostic"
|
||||
update_interval: 60s
|
||||
|
||||
# LUX value used for deciding if display should be updated (only if it can be read)
|
||||
- platform: homeassistant
|
||||
entity_id: <YOUR-LUX-SENSOR>
|
||||
id: presence_lux
|
||||
|
||||
- platform: homeassistant
|
||||
entity_id: weather.<YOUR-WEATHER>
|
||||
attribute: temperature
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue