Calling automation experts

I have a airpurifer (winix) and have got the integration working correctly. Now I am looking for following functionality -

  1. a lovelace slider with values from 1 to 3 with step 1.
  2. I use winix integration card to turn on the fan.
  3. After the fan turns on, based on slider value , fan stops after that many hours.
  4. if I turn off the fan manually, the timer stops and resets
  5. a display time under slider shows remaining time.
  6. if i move the slider while fan is still on, it resets the timer and starts new countdown.

Is it possible to do so ?

Most likely yes.
Maybe you could try and solve some of it yourself?
After all you should show your workings. How to help us help you - or How to ask a good question - Configuration - Home Assistant Community (home-assistant.io)

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…

  1. My input number is called ‘input_number.purifer_timer’
  2. 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
1 Like