I have a 3-way switch installed in a multi-way circuit. It shows as an on-off-switch whereas its function is to be a toggle from on-off or off-on based on a momentary push.
Has someone figured out an elegant graphical way to show this in Lovelace?
In an ideal world, it would even integrated the state of the underlying circuit, energized or de-energized
The relay included with the smart switch is a single pole double throw type which connects Common to one of two Travelers so that the switch can be installed at either end of a multi-way circuit.
The device generates two MQTT switch entities, each with ON/OFF states. One entity is the physical state of the switch and the other the state of the circuit. So it is possible for circuit to be ON while the switch is OFF because of one of the other physical switches.
So you are only getting the state of the switch connected to the smart device not the state of the load in (what the rest of the world calls) a two way system.
You need to rewire the switches so that the two physical switches (connected by the traveller wires) are connected to your smart switch input. That way if either of the switches changes state your smart device can tell and it changes the load.
In HA what do you care what the switches are? You care whether the light is on or off. You want to turn the light on or off. Why do the switches need to be represented at all?
Agree completely. It is just that MQTT Discovery set up my 3-way smart switch as two switch entities and I’m trying to figure out how to get the circuit to be represented as a light whose state is shown by an icon and that can be turned on/off by touching that same icon instead of another icon
Still figuring out my way around, hence often don’t know the right question to ask.
Light templates look fascinating and I might be able to get away with using an icon_template and a value_template and possibly an availability_template.
If the state has evaluated to “on” and I click the icon, does it invoke the turn_off function? And can I just assign a value to a switch entity in the turn_off function instead of invoking a service like in the examples?
(Of course something equivalent would have to done for turn_on)
switch.treatlife1_toggle1 tells me whether the light is on and toggling switch.treatlife1_toggle2 (it accepts commands to turn it on or off or to toggle it) will toggle the light. The code below created an entity called light.front_porch_lights that shows the correct state of the lights and is clickable to toggle it!
I can put it in a light card in Lovelace in which case it shows up as a bulb or in an entities card where it shows up as a toggle switch. Unfortunately, the light card can only take a single light.
Maybe I should open up a new topic for this but today, we had a power outage. When the electricity was restored, the three way switch kind of works except ON is now OFF and vice versa in both the dashboard and the LED on the switch.
Is there a reset function or something that I should be invoking? I could change the template to match this behavior but the next power outage could switch things around again so I am hesitant.