After adding that it worked and HASS didn’t think it was a light anymore. But after the latest update, my automations stopped working and it’s now a light again.
I never understood why HASS thinks that a generic power switch is a light.
Can anyone help me with this? I really want the fan to work again. I have no idea what I’m doing.
First off your config will fail outright in 5 months, you should have a repair warning for that. You can read up on what a template fan entity should actually look like in the Template Integration Docs, it’ll also help with the “I have no idea what I’m doing.” issue.
What does the switch actually look like in HA? Go to the device page and click on the entity, take a screen shot, and post it back here.
It will likely also help if you can post what you’re using to trigger your automations that are no longer working.
Similar is not equal to the same. Go to Settings > System > Repairs and the click the 3 dot menu in the upper right corner and check ‘Show ignored repairs’, see if you have anything then.
As to your screenshots you stopped just before the important part, what do you get when you click the ‘Actions:’ > Fan ‘turn on’ Unknown entity?
It looks similar and I don’t know what to do with that page. It links me to general information.
I don’t even know how I ended up in this mess. That device was never a light nor meant to be a light. I’m very confused why Home Assistant thinks a generic device is a lightbulb instead of asking what it is.
Here you go. The error is gone, it’s not under ignored. Didn’t solve the problem but the error is gone
Or, if you’re not bothered about it being a fan entity, just change the action in your automation to ‘Light Turn on’ instead of ‘Fan Turn on’ and select the light entity.
I think the issue lies with the device and the way it publishes its info that makes HA see it as a light, I had one that did it a few years ago, but Z2M updated and it changed eventually. If you raise an issue on github (assume you are using ZHA and not Z2M) you might be able to get someone to do a translation (not sure that’s the right term, maybe ‘quirk’ ?)
Assuming you only have this one template entity in your configuration.yaml file you can change your original configuration to what Holdestmade posted above… similar but not the same.
If you already have a template: key in the file then just paste everything after it, if not paste the whole thing.
Although a simpler, more maintainable, and UI friendly fix might be to just go to Settings > Devices & services > Helpers then click Create helper in the lower right and use the ‘Change device type of a switch’. Select the switch and choose ‘Fan’ as its new device type. Then use the new ‘fan’ entity in your automations, it’s pretty bullet proof.
If you go this route just remember to remove your original template entity from configuration.yaml and restart Home Assistant to avoid any conflicts.
I am bothered about it because it messes up with the audio part so if i turn off the lights, the fan goes off too. quite annoying. it also shows as a fan.
I copy pasted it and rebooted and it’s still a light
The light entity will still exist but there should also be a fan entity, there must be one as you are using in your automation ? Not sure if you can disable the light now, not sure if that will stop the template fan working
I’m lost here… the modern template entity you provided should work, and there should be one light entity and one fan entity. At that point you should be able to hide the light entity, maybe something in the way zigbee works? I have no experience there.
Well I can use it in the automation now but it’s still a light. It’s confusing to me. I don’t know what to provide as new information. It’s a light and it shouldn’t be one. At least the automation works but it’s not what I hoped it would be.
It won’t turn it into a fan you’ll get a fan entity as well. I’m not sure you have it configured correctly, what is in your config.yaml ? try pasting this straight into config.yaml. or look here and see how to do it in your fans.yaml file
What kind of Home Assistant installation are you using? Regardless what this template does is creates a fan entity based on the state of your ‘light’ entity, the light entity will still exist and the fan entity wouldn’t work without it.
Holdestmade beat me to it, but how you’re including this file in configuration.yaml is important here for it to show up as an entity that you can use.
That said it does seem redundant to me as it just mimics the ‘light’ entity anyways. If you’ve got the automation working, and you’ve got it looking like a fan in the front end as a fan now, the only real tangible difference is what you see in the more info dialogue.
Problem is its classed as a light for Assistant - “turn all the lights off” … think someone mentioned that earlier. With a templated fan you can expose the fan to Assistant and not the light