Closed trajano closed 1 week ago
Yes, this is because it is now a state attribute of humidifier. Whenever the type of a property is changed, the former entity will no longer be created. It will still exist as unavailable in HA until deleted. Another thing that needs to be documented.
Actually re-opening this unless you claim that you cannot have both the current_humidity
device state and the sensor at the same time because at present there's no way I can find to display the current humidity value.
It is displayed in the humidifier UI (disregard the actual % value - this is an AC that does not measure humidity which I reconfigured to be a humidifier to create the screenshot):
Current humidity also shows up in the charts:
If you want to build a dashboard, the "Entity" card can show state attributes:
Finally, in templates you would do like this (replace the entity id): {{ state_attr('humidifier.my_dehumidifier', 'current_humidity') }}
I'm actually just trying to get the current humidity value in the "badges" area of the dashboard. Right now it's not an option.
Can you try to create a template sensor of the state attribute from the humidifier entity: https://www.home-assistant.io/integrations/template/ ?
It is not recommended to expose state attributes as sensors as well by the integration to avoid storing the same history on two separate entities.
That said, it is not difficult to support mapping ConnectLife properties to more than one entity, but it goes against a core principle of Home Assistant.
Thanks I used {{ state_attr('humidifier.dehumidifier', 'current_humidity') | float }}
since I want it numeric. If HA's architecture recommends not to expose it that's fine let's not. Though I am curious why they made it difficult to get.
@oyvindwe I noticed that current_humidity_changed
trigger does not appear to work. I am switching it to the template to as a workaround.
@trajano That's unfortunate. Did you make a trigger using the template sensor or the state attribute? E.g.:
Yup that's how I did it.
After 0.7.0 update the template stopped working and I am not getting anything on the badge
Actually after the update
Anything in the log?
Nothing of note in logbook. The entity just disappeared I think. But the sensors are still there?
Deleted and re-added all I see is the fan speed selector
So likely there are changes on humidifier
that broke this.
Tracking the above problem in a new issue
in 0.5.0 the current humidity entity is missing![image](https://github.com/oyvindwe/connectlife-ha/assets/110627/180a0181-e0d6-4309-903a-8f0011ef2e11)