#[SOLVED][ZHA] SONOFF TRV does not report "heat" as available hvac_mode

1 messages · Page 1 of 1 (latest)

covert frigate
#

Hey there,

I'm a bit bazzled on how to fix this, maybe somebody has an idea:

I do have a few SONOFF TRVs in my home and I'm generally very happy with them. However one of those thermostats is reporting the HVAC modes it's capable of wrongly. Or (Z)HA understands them wrong?

What's happening: One day, I realized that I cannot turn the TRV back on from the UI if it's off (see 1st attached screen, the selector has no "heat" option). In the dev tools, I can see that the TRV in question has hvac_modes: off, while all other TRVs have it set to hvac_modes: off, heat.
The only way to turn it back on is either manually on the TRV itself, or opening the device and flip the switch (see 2nd attached screen).

I cannot see how one TRV (which I bought together with others that work fine), has just this one fine detail issue. It works absolutely fine, it's just that the HVAC modes are reported wrong. I can't even recall if it was always like that, or if it was working fine until one day.

I tried removing the device and re-adding it, but that didn't help.

Hope somebody has an idea.
Thanks and Greetings!

minor osprey
#

That's... Something.
I've got 11 of those around the house and never seen anything like it lol. Do you have the latest firmware on them?

covert frigate
#

So I got it solved. I remembered I had some SQL queries in a notebook I used in the past to fix weird behavior of HA with some entities/devices. Like when re-adding a faulty entity just brings back the faulty one.

I remembered you can just delete the whole state history like that (1st is just querying them for double checking what you're about to delete and 2nd is actually deleting them):

SELECT states.*, states_meta.entity_id
FROM states
INNER JOIN states_meta
  ON states_meta.metadata_id = states.metadata_id
WHERE states.metadata_id IN (SELECT states_meta.metadata_id
  FROM states_meta
  WHERE states_meta.entity_id LIKE '%bedroom%heater%')

DELETE
FROM states
WHERE states.metadata_id IN (SELECT states_meta.metadata_id
  FROM states_meta
  WHERE states_meta.entity_id LIKE '%bedroom%heater%')

Deleting the state history like that and re-adding the TRV fixed it and it now reports as hvac_modes: off, heat

#

[SOLVED][ZHA] SONOFF TRV does not report "heat" as available hvac_mode