I am having a similar dilema. I have configured a simulated switch in smart things when it is turned on smart things tells harmony to turn on the TV and vice versa to turn it off. But if you tell google to turn on the tv the switch is turn on if you use the remote to turn off the TV the switch remains on. the next time you tell google to turn on the TV the the command doesnt trigger the piston becaue the switch is already on.
One solution is to get a plug with a voltage draw reading and plug the TV into it. If the voltage drops below X then set the TV simulated switch to off, thus resetting the switch. Thought I would post this as a possible solution to your problem.
Another posible solution is using a button instead of a switch. Their is not state read you would simple tell alexa or google to trigger the button name for example “Hey Google, Trigger TV”. The problem with this is that you wont have a state reading. This becomes a problem in a case like mine where if I tell google to turn on the Theater I want to turn off the TV if it is on.
This last solution is a maybe
Create two switchs with the same name and give your alexa or google home access to both swtches.
Switch A initial status = on
Switch B initial status = off
Call both switches the same name lets say TV
Command to google
Hey Google turn on TV
Switch A (named ‘TV’) stays on
Switch B (named ‘TV’) changes to on
If TV (switch a) or TV (switch b) ANY OF changes
DO THINGS AND STUFF
Set switch a = on
Set switch b = off
The only concern here is how will google react to having two devices with the same name?
just tested with google, it looks like it will work. Google responds by saying okay turning two things on. going to draw up the test piston now
Created Piston, It works see attached screen cap of piston. Its a little complicated and required quite a bit of debugging so be ready, of course that was primarily becaue I was configuring it for a TV.
Added Variable to prevent re-trigger when piston sets value. This will be needed.