#Tuya being Tuya, but WTH?

1 messages · Page 1 of 1 (latest)

cosmic thicket
#

So a VERY simple automation. WIFI Tuya switch using Tuya in Core.
I know, it's Tuya, I don't expect much, but this is weird...
The automation is this:

- id: '1737881768447'
  alias: Buttonize switch 3
  description: ''
  triggers:
  - trigger: state
    entity_id:
    - switch.ks_811_3_switch_3
    to: 'on'
  conditions: []
  actions:
  - action: switch.turn_off
    target:
      entity_id: switch.ks_811_3_switch_3
    data: {}
  mode: single

Where in that automation does it say toggle, or turn on, or anything like this.
It only happens when I physically click the wakk switch. I can click it on the HA dashboard all day long and that never happens.
Thinking of adding a ridiculoud condition that the switch has to be on, I don't know...

#

I added the condition. It still does it.
And yes to make sure I wasn't getting it wrong, I'm doing this in the UI editor.

cosmic thicket
#

De-bounce needed maybe? Check that it's on for 1 second, then respond?

iron star
#

it could be lying about the context of the turn back on, do you have any other automations that pay attention to that switch?

cosmic thicket
#

Problem is I'm back home today and I cannot push the button/
Even if it is de-bounce, there was no action in that automation, or any other, that should have turned that on . The log said turned on be automation.

iron star
#

could also be tuya rejecting the state change, HA just says it's the automation doing it because it happened in close proximity

cosmic thicket
#

I have specifically isolated the switch. Basically tht switch is a trigger. If 1 other automation sees it's flipped to on, it increments a number helper and that doesn't change the state of the switch at all. Just uses it as a teigger.
Hense I want to push the button and reset it to off. It's a tuya unit with 3 physical buttons. One off the relays is used on a light, the other 2 are just buttons for remote control.