#Fan automation

1 messages · Page 1 of 1 (latest)

vapid agate
#

Hi,

I am having trouble making an automation do what I want it to do. Here is what I want this automation to do:

I have a fan in my office that I am controlling with an IR remote using ESPHome device. I want the fan to power on when temperature in the room goes above 78F. I want the power button to be pressed down to change the speed from 4 to 1. I want the power button to be pressed 4 times. 1 time to power on the fan, and 3 other times to lower it to 1. and then i want the Oscillation button to be pressed to make the fan oscillate.

Here is what my automation looks like.

#
alias: Office fan
description: ""
trigger:
  - type: temperature
    platform: device
    device_id: c062bdbdfa
    entity_id: e11ddf5f77
    domain: sensor
    above: 78
condition: []
action:
  - sequence:
      - repeat:
          sequence:
            - service: button.press
              metadata: {}
              data: {}
              target:
                entity_id:
                  - button.esphome_web_497684_power
          count: 3
      - service: button.press
        metadata: {}
        data: {}
        target:
          entity_id:
            - button.esphome_web_497684_osc
mode: single
pastel dragon
#

You want to add a delay (say half a second) after the button press

vapid agate
#

how do I do that if you dont mind showing me?

pastel dragon
#
  - sequence:
      - repeat:
          sequence:
            - service: button.press
              metadata: {}
              data: {}
              target:
                entity_id:
                  - button.esphome_web_497684_power
            - delay: '00:00:01'
          count: 3
vapid agate
#

Thank you!

#

This did not work for me.

pastel dragon
#

What does that mean?

vapid agate
#

I mean, it did not go to power level 1 like i wanted to and the Oscillation did not trigger at all.

pastel dragon
#

Check the trace