Not to mention how low quality the question is to begin with, do you expect us to find out what your entities are called, and figure out what service calls to use to get your fan going?
I’m not a fan of that.
apologies… i should have added more details. still a noob in HA. Please be gentle.
Here is what I got so far…
My input number is called ‘input_number.purifer_timer’
my winix entity is named as fan.winix_living_room
I have created following automation so far…
id: '1680580761910'
alias: TurnOff
description: Turns off air purifier for selected number of hours.
trigger:
- platform: state
entity_id:
- fan.winix_living_room
to: 'on'
action:
- delay:
hours: '{{ states(''input_number.purifer_timer'') | int }}'
- service: fan.turn_off
data: {}
target:
entity_id: fan.winix_living_room
mode: single
Untested since I’m not home but an automation can be saved like this, so perhaps it could work.
id: '1680580761910'
alias: TurnOff
description: Turns off air purifier for selected number of hours.
trigger:
- platform: state
entity_id:
- fan.winix_living_room
to: 'on'
for:
hours: '{{ states(''input_number.purifer_timer'') | int }}'
action:
- service: fan.turn_off
data: {}
target:
entity_id: fan.winix_living_room
mode: single