I’m having an issue getting a toggle to act correctly. I’ve watch the great videos on youtube about triggers, but am still having this problem. The toggle turns off and on a light through Vera. I have 2 DataTrigger and 2 EventTrigger events set up.
DataTrigger1: Binding: Light1 / Value: On
2 Setters: 1) Change the image & 2)IsChecked: True
DataTrigger2: Binding: Light1 / Value: Off
2 Setters: 1) Change the image & 2)IsChecked: False
EventTrigger1: Event: Checked
3 Actions: PropertyAction: Change the image
PropertyAction: Light1, IsChecked True
DataAction: Binding to Light1 = On
EventTrigger2: Event: Unchecked
3 Actions: PropertyAction: Change the image
PropertyAction: Light1, IsChecked False
DataAction: Binding to Light1 = Off
If I turn the light on & off via Vera - OK
If I turn the light on & off via Toggle in HR - OK
However, if I turn the light on via Vera via the toggle, the image doesn’t change, but TV turns off. Id I then click the toggle on HR, the image changes to correct state. From then on, turning on via Vera doesn’t change the image. I’m sure this is something simple, but after 5 hours, I can’t figure it out.
I’ve also tried with a plain toggle (no image changes) and the same thing happens. It appears that if you turn on via EventTrigger and turn off via DataTrigger the IsChecked=Off does not fire. Seems to be a problem with the Setter in the DataTrigger.
Thanks