I successfully flashed and integrated Sonoff Basic switches to Home Assistant.
In my specific context, the Sonoff Basic lives between the power socket and a lamp (the lamp is electrically always switched on so that the management is done with the Sonoff). It is therefore more a “light” for me than a “switch”.
Specifically, I would like it to present itself to Home Assistant as a light, so that the icon reacts to the state of the switch (= that the bulb is illuminated when on).
Is this possible?
I found a bit in the ESPHome documentation about the “Light Component” but it is not clear at all for me how this integrates with the switch configuration of my Sonoff (or whether it remplaces it, or whether this i ssomething completely different).
As a side note, I currently use a workaround to have switches seen as lights, though a light entry such as
- name: martin bureau gauche
platform: switch
entity_id: switch.multiprise_martin_mss425f_switch_2
The main problem here is that this disables the ability to manage the entity via the UI (to add a friendly name) and complicates my YAML configuration (I have to separately customize each entity - which would be fine if the entity was not already integrated, and therefore manageable though the UI)