Tuya room thermostat logging

I want to set up an automation? for my TUYA thermostats like : if current_temperature < (temperature -1) then turn a virtual binary device on/off that will show in history & logbook and can be used on my dashboards (temperature is the target temperature, see below)

This is roughly equivalent to working_status on the Tuya app, but they don’t expose it via the API so I can’t access it using Home Assistant :frowning:

I have other automations running, but I can’t for the life of me work this one out

the entity is climate.bathroom
hvac_modes:

  • ‘off’
  • heat_cool
  • cool
  • heat
  • heat_cool
  • fan_only
    min_temp: 0
    max_temp: 70
    target_temp_step: 0.1
    current_temperature: 15.9
    temperature: 11
    friendly_name: Bathroom
    supported_features: 1

Bump

I just need to know how to see in logbook and history if a thermostat is “on or off” by comparing 2 sensors.