Possible Bug With Automations Using Visual Editor?

First off, I’m new to Home Assistant, but I think there is a bug that affects certain devices when used with automations.

I set up an automation using the visual editor. The goal was to get a Smart Cocoon vent register booster fan to turn on when the Ecobee sensor in that room gets above 75. The automation will trigger, but the fan never comes on. I did a test to make sure the automation was setup properly by removing the fan and replacing it with a random smart light. I then ran the automation to trigger it and the light came on as I expected it too. I then removed the light in the automation and replaced it with a smart Ceiling fan. I ran the automation, but the ceiling fan would not come on either.

So it appears that the automation is setup properly. However, for some strange reason, when triggered, the automation can turn on lights, but it will not turn on any fans for some reason.

Maybe I’m missing something, but any help would be appreciated.

You’re missing the code for your automation, formatted properly — see points 9 and 11 in the How to Help sticky:

Can you control the fan from HA directly?

Jumping to the conclusion that HA is unable to control fans is a bit premature…

Thanks for the quick response. Yes, I can control the fan manually. And LOL. Wasn’t jumping to a conclusion. That’s why I put a ? at the end of the subject title.

I’ll give you 2 code setups. This is the code to turn a fan on. When I run it, the fan will not come on:

alias: New Automation
description: ""
trigger:
  - type: temperature
    platform: device
    device_id: 52acfd5dc5ced9fb00ffe52ddc4b25a1
    entity_id: c1ecf06f4971e556a5d12bb2b890da4a
    domain: sensor
    above: 75
condition: []
action:
  - type: turn_on
    device_id: 5e9d3450f862e80eb453dda958455b4f
    entity_id: 3a561caaeeba0258106d1617768c65bc
    domain: fan
mode: single

Now, when I change the fan to a light and run the automation, the light comes on fine. You’ll notice that I didn’t change much here. Here is that code:

alias: New Automation
description: ""
trigger:
  - type: temperature
    platform: device
    device_id: 52acfd5dc5ced9fb00ffe52ddc4b25a1
    entity_id: c1ecf06f4971e556a5d12bb2b890da4a
    domain: sensor
    above: 75
condition: []
action:
  - type: turn_on
    device_id: 417a4a9ef239e1e338719e382b84be62
    entity_id: 008cac09976d161ad5615ac2f9b92fbe
    domain: light
mode: single

The current temperature in the room is above 75 now so it should trigger and turn on the fan when I run the automation, but it won’t. When I swap out the fan for a smart light, the light will turn on when I run the automation. That’s why I was a thinking a bug. Keep in mind that I’m using the visual editor since I’m quite new to YAML.

I’m really liking HA. I’m coming from Smartthings. I have a lot of stuff setup in HA and everything works great. I’m just hung up trying to turn on fans with automations. I can turn everything else on in automations. Just can’t get any fans to turn on in automations for some reason.

Think the temperature has to go from below 75 to above 75 to trigger the automation.

It won’t trigger if the temp is already above 75 when the automation is started.

I thought that too, but the automation triggers when I run it. The current temp is over 75. If I set up a light, it’ll turn right on when I run it, but if I set up a fan in the same automation, it won’t. Weird…

Ok, don’t know then.

To be honest I always use entities rather than devices in automations - names are much easier than long strings of hex.

I’d set up a new test automation in the ui - numeric state trigger
Two actions fan turn on, light turn on

Use entities not devices so you should end up with much more readable YAML. See what happens?

Good luck

1 Like

Agreed — you may actually be right about the bug in this case. Your entity IDs in the code are not valid, and we’ve seen a couple of other situations like that.

Find the entity IDs of your fan, light and sensor which should start fan., light. and sensor., and use numeric state triggers and call service actions instead.

2 Likes

Thanks a bunch. I’m new to YAML, but I think I can figure it out. Thanks for the help.

Thanks guys. The numeric state and call service did the trick. Much appreciated!

2 Likes