Entities showing up as wrong Domain

I have several D1 mini’s that I have MCP230xx’s on running a self complied copy of Tasmota. In the Tasmota interface I can see all 16 outputs and toggle them. When Home Assistant brings them it the Outputs show up as sensors. You can’t toggle sensors in the IU. How do I make it so I can switch these outputs and display them properly on the dashboard?
I have tried to search for a way but the only thing I am finding is how to change a switch to a light. Not helpful here.

Are you using MQTT Discovery or the Tasmota integration to integrate them into Home Assistant?

Either way, the two methods use the information they receive to create the entity (in other words, it’s only doing what it has been instructed to do by the device).

1 Like

I’m using the Tasmota integration right now. I can switch to MQTT if that will solve it. Or do you know a way to have Tasmota tell the system something different. In the UI of the device I have switches that I can change to turn them on and off. Is there a way to have Tasmota “broadcast” those pins as something different?

Everything you need to know is in Tasmota’s documentation here:

It describes all the the options available to configure Tasmota’s discovery information.

If it can’t be made to work the way you want, you can try switching your Tasmotized device to use Home Assistant’s MQTT Discovery using SetOption19 1

Set Home Assistant discovery protocol.
0 = use Tasmota integration (default)
1 = use MQTT discovery

However, be advised that the Tasmota project implemented their own style of automatic discovery and have deprecated their long-standing support of Home Assistant’s MQTT Discovery (you can switch between the two but their own style is now the default). They may eventually discontinue including MQTT Discovery in their default compiled images (to make space for other functionality).

Thanks for the reply. I will look at the docs again. As a side not I may have found a work around. I am using the MCP to control a 16 relay set. Even though Tasmota shows them as sensors to the outside world, they can still be controlled via the POWER"#" command. like “POWER16 on” for example. I am using NODE-RED to make the entity in HASS and then set a change rule for the output of the switch and then sending that to the device via MQTT. It isn’t the easiest way to do it but it will make things work.
Just sucks I have to do it 128 times.

That would be reason enough for me to find a way to make them appear as switches instead of sensors.

Well i am taking a shortcut with copy and paste in NR. Made one, paste 15 times, change POWER"#". Copy that flow 7 times then just change the topic and paste. Then change the entity name from FW1 1 to FW2 x. I have been fighting with it long enough I just want a solution so I can move on to the next step of the project. 3 weekends to finish building and testing. Building a remote fireworks system that I can automate 128 different cues in HASS.

Note this part mentioned in the documentation listed above. It seems to describe your problems…

Depending by the SwitchModeused, a switch can be a Trigger (TOGGLEor HOLD), a Binary Sensor (ON/OFF) or both at the same time.

When using with SwitchMode 0 Tasmota will create just one Trigger for TOGGLE.
When using with SwitchMode 1 Tasmota will create a Binary Sensor with ON and OFF Payloads.
When using with Switchmode 5 Tasmota will create a Binary Sensor with ON and OFF Payloads and a Trigger for TOGGLE.

That looks like it is talking about normal switches. Not many people are trying to run 16 IO’s off of a mini with MCP. As a result Tasmota has the ability to set it up, if you compile it yourself, but they aren’t spending time developing it further. As a result you can only control the settings using Sensor commands. @123 did help me out by convincing me to look deeper at the doc section. I found that editing the configuration.yaml offline was faster with Visual Studio. That let me make them in HASS exactly like I needed. While I was in there I added the code to monitor the wifi for each.