Virtual state for Tuya scenes

Hello everyone,

I want to enable the air conditioner when it’s too hot and disable it when it’s cool enough. To achieve this, I purchased a Tuya IR Remote controller. However, after setting it up, I discovered that HA couldn’t directly control the devices, and I had to create “Tap-to-Run” scenes in the Tuya app and call them from HA.

My initial idea was to create an automation that would enable the scene when the temperature sensor reaches a certain value. Additionally, I wanted to create a switch that could be used to enable or disable automatic temperature regulation. Is it possible to implement something like this?

I tried creating a template switch, but I’m unsure about what to put in the value_template field. Tuya scenes always have an “unknown” state. Do you have any ideas on how I could work around this?