Since My fan component is changing more away from the other components in the other threads found here:
I figured I would just start a new thread on this topic.
I now have a package that contains a set up for both an MQTT fan using the Sonoff iFan02 controller and an old dumb ceiling fan that can be controlled by a Broadlink RF controller.
Here are screenshots of the component in action:
Here is the link to the package:
It’s fairly obvious but for completeness I need to mention that you will need to modify the package to use your own details such as entity names and especially your broadlink RF codes and/or MQTT topics.
If you don’t use packages then just copy each section of the above code into it’s appropriate section (switch:, script:, fan:, etc.)
And here is a link to the code for the fan control row:
Then in order to use this component in you UI…
Place the following in your “resources” section in your lovelace configuration (modifying the directory for the location that you created the component):
- url: /local/lovelace/fan-control-entity-row.js type: js
Then to use this in a card place the following in your entity card:
cards: - type: entities title: Sunroom show_header_toggle: false entities: - switch.sunroom_light - entity: fan.sunroom_fan type: custom:fan-control-entity-row name: Sunroom Fan
I assume it will work in other entity-type cards but I’ve only ever tested in an entity card.
This doesn’t use the custom_updater and right now I don’t have any plans to do that unless I start trying to actively modify the component then I may consider it.
The colors can be changed but only by modifying the underlying code of the .js file. Right now there is no external configuration for it but I’m trying to figure out how I can do that. (I’m not a real programmer )