The idea is whenever someone comes home after everyone being away, or at 6:30 am, or whenever the temperature changes, as long as it is between 6:00 am and 8:00 pm, and someone is home, and the temperature is above 26, then the fan will be turned on, and the speed will depend on the current temperature. Obviously change the thresholds and the speed values if I didn’t get that part right.
- id: lounge_fan_on
alias: Lounge Fan On
trigger:
- platform: numeric_state
entity_id: sensor.wirelesstag_lounge_temperature
above: 26
- platform: state
entity_id: group.family_presence
to: 'on'
- platform: time
at: '06:30:00'
condition:
condition: and
conditions:
- condition: time
after: '06:00:00'
before: '20:00:00'
- condition: numeric_state
entity_id: sensor.wirelesstag_lounge_temperature
above: 26
- condition: state
entity_id: fan.lounge_fan
state: 'off'
- condition: state
entity_id: group.family_presence
state: 'on'
action:
service: fan.set_speed
entity_id: fan.lounge_fan
data:
speed: low