How to convert a switch entity to a cover entity - tuya devices?

If you have access to the trigger object in node red, use the associated to_state or from_state state objects context.

Those are a bit contrary, aren´t they?

They are, I don’t use node red. I was under the impression that they didn’t have access to triggers. You’re saying otherwise. I’m trusting your response that they are.

I didn´t say that.

Sorry, I thought you said you’re monitoring the trigger in NR. If you mean that you’re using a normal automation, then use the trigger to_state or from_state context.

trigger.to_state.context

I made few experiments, but so far it seems, HA cannot recognize if the blind will be controlled by the physical (WIFI Tuya) switch…

Can you please post what you’re trying, the code. We aren’t getting anywhere here and this is quite simple for templates.

Let´s take an easy task: If any change of the state get recognized, then log it:

alias: "Log-Protokoll: Büro-Rollo2"
description: Statusänderung wurde erkannt
trigger:
  - platform: state
    entity_id:
      - cover.buero_rollo2_vorhang
condition: []
action:
  - service: logbook.log
    data:
      name: Büro-Rollo2
      message: Statusänderung
      entity_id: cover.buero_rollo2_vorhang
mode: restart

Whatever - not HA - action will be performed on the blind, the change of the state won´t be recognized by the above automation.

If what you’re saying is true, then you’re saying that the cover itself never changes state. Which is possible depending on the integration it comes from. If that truly is the case, then there’s nothing you can do aside from making it an assumed state. This will have a chance to be out of sync during an HA restart. I’d urge you to find a way to get a status from the device itself instead of going with an assumed state.

And now you arrived at the start of my inquiry… :slight_smile: