ThermIQ / thermiq_mqtt-ha

Home Assistant integration of ThermIQ-MQTT, providing control and logging of Thermia heatpumps
https://thermiq.net
MIT License
23 stars 19 forks source link

Missing binary sensors #43

Closed markora closed 9 months ago

markora commented 1 year ago

Home assistant core version: 2022.11.4 Thermiq: 2.0.5 FW: 1.4?

After the latest update all my thermiq binary sensors got replaced by regular sensors. An example:

sensor.thermiq_mqtt_vp1_boiler_6kw_on

This sensor used to be binary_sensor type previously. It seems that the new sensor is working and updating On and Off values correctly.

Is this the way it should be working from now one or is this a bug? Similar issues for someone else?

ThermIQ commented 1 year ago

This is intended, at least for now. The binary sensor has been replace by a normal sensor with 0 and 1 as valid values.

Are there any drawbacks by doing it like this?

Rgds /&&

markora commented 1 year ago

Ok, thanks for the info.

I am surely not an expert not an expert to answer for this. I took the opportunity to ask from discord channel and here is an answer: "(binary sensor) restricts the range of possible values, so don't need to worry about getting random values. binary_sensor also has a bunch of standard translations based on device_class that sensor doesn't have"

Based on this I would say that the latter could be a possible advantage of using binary sensors instead of just sensors.

And the out of scooe values could be a problem but impossible to say without knowing how HW works.

Some more info on developer portal: https://developers.home-assistant.io/docs/core/entity/binary-sensor/

ThermIQ commented 1 year ago

Ok, I'll put it on the backlog but with low priority until base functionality is in place and verified by some more people

jascdk commented 1 year ago

@ThermIQ I would also suggest that all sensors that have a state of 1 or 0 should be a binary sensor. IMO it is the most correct :) The problem is that a sensor with state on or off does not have the capability to reflect its state in HA with a color (so it easy viewable through the dashboard. Binary sensors does that

jascdk commented 1 year ago

Ok, I'll put it on the backlog but with low priority until base functionality is in place and verified by some more people

@ThermIQ any news on this :)

ThermIQ commented 1 year ago

No progress yet but not forgotten

jascdk commented 11 months ago

@ThermIQ any news :)

ThermIQ commented 10 months ago

No, feel free to implement and push a change

tomrosenback commented 10 months ago

Another point that increases the priority is that groups of sensors are not working as they are expecting numerical values not on/off states.

ThermIQ commented 10 months ago

A new beta is available with binary_sensors, @tomrosenback please check it out

tomrosenback commented 9 months ago

You are referring to 2.1.1? It seems to work but looking at the code it seems like the BinarySensor entity is missing the is_on property which makes the states be strings instead of booleans.

ThermIQ commented 9 months ago

Aha,That makes sense, I thought behaviour was odd, will fix later today

tomrosenback commented 9 months ago

Tested 2.1.2 now, works perfect! Thank you!

ThermIQ commented 9 months ago

Great! Summary of how time was spent:

With my new internal How-to I expect that I can shorten the development time for a feature to an hour or so. Still no idea how to address the 1 Year stalling time :-)

/&&

jascdk commented 9 months ago

Also running version 2.1.2 here without any issues so far:) great work :)