Hi all,
Some time ago, I changed my sonoff basic devices from MQTT over to the Tasmota native integration, and it works really well.
I’ve recently discovered though, that the sonoff basic devices are registered as light such as light.sonoff1. I tried modifying the entity and I ended up with a broken install, and had to roll back.
Does anyone know how to change the domain of the sonoff basic Tasmota devices from light to switch?
you can either use the helper “change switch to x”
But that will probably not enable other options such as “dimming” or color / temperature adjustments.
In that case, you might open a ticket with the guys that support the tasmota integration.
What technology are your devices?
ESP / WiFi / Zigbee?
Since you are running Tasmota, I think these are ESP based devices … so ESPHome could also be an option…?
If they are using Zigbee - then, ZHA or Z2M could be also another option for you?
But I haven’t done anything with Sonoff Tasmota stuff so far, so I am not sure about this.
Ah!
I see
In my humble opinion: I would leave this as “light”.
I have a similar device for a LED Strip - and since it is supposed to controll light entities, I would consider it as expected behave - to be recognized as light entity.
Anyway:
You will find the helper where you add integrations:
That’s interesting, thanks for your advice finding the helper.
I went to the Helpers menu as advised, but it looks like there is no option or even way to find the “Change device type of a switch” menu, even for the other entities.
It might be that the Tasmota integration is creating read-only entities or something.
Seems like I might be stuck with these, what a bummer.
hm… while I still think that the classification as “light” could be considered as correct (as far as I know, these devices are used to be light controllers / drivers for lights) - I am not sure, if the helper should be capable to change a device of the light domain to a switch - or another device class… but my recommendation would be, to raise an issue to the developers of this integration (is it the core, or a custom one?)
They might change the device class to switch - that would probably allow the greatest flexibility, because then you could change it to one of these device classes:
I can see what you mean, but I’m just speaking as someone that uses these devices and observed others using them.
As far as I’m aware, these devices are low-cost and general purpose switches that can be used for basically anything, and (just my opinion) I would say they are definitely not leaning towards light controllers in particular, but it is definitely part of their use case.
I personally use them to control fans, power sockets, a venitlation system, a bathroom air extractor, and some other home devices, but I’ve never used these for a light or lamp, but I could.
Much of the issue I’m encountering now with these sonoff basics being light devices is around the migration I performed in this thread, where I migrated from the tasmota-MQTT backend to the tasmota-integration backend.
After performing this migration, all my “sonoff basic” devices show up as light entities, and were previously switch entities.
What I find especially interesting, is that I also own other sonoff devices like a few “sonoff POWR2”, and they show up as switch entities. Its a little baffling, because these were migrated as well in the same way, at the same time.
I’m not sure how to address this issue, but I might have to log a bug or issue in the integration github or something. It seems inconsistent to me.
If you currently have setoption30 0 you have an issue to report.
If you currently have setoption30 1 it is the correct behaviour.
SetOption30 Enforce Home Assistant auto-discovery as light
0 = relays are announced as a switch and PWM as a light (default)
1 = both relays and PWM are announced as light