home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.58k stars 29.91k forks source link

Gathering statistics on EvoHome integration #84101

Closed dirkvanthillo closed 1 year ago

dirkvanthillo commented 1 year ago

The problem

I tried to link a statistics graph card to climate sensor through "Honeywell Total Connect Comfort (Europe)" integration. But the sensor is not listed. Found this reference to this situation: [https://www.home-assistant.io/more-info/statistics/]

What version of Home Assistant Core has the issue?

2022.12.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

evohome

Link to integration documentation on our website

https://developers.home-assistant.io/docs/core/entity/sensor#long-term-statistics

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @zxdavb, mind taking a look at this issue as it has been labeled with an integration (evohome) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `evohome` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign evohome` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


evohome documentation evohome source (message by IssueLinks)

garethmarlow commented 1 year ago

The work-around is to create a new template sensor for each thermostat:

  - name: Daniel's Room
    unique_id: daniel_s_room_current_temperature
    state: '{{ states.climate.daniel_s_room.attributes["current_temperature"] | replace(" c", "") | float }}'
    unit_of_measurement: '°C'
    state_class: measurement
dirkvanthillo commented 1 year ago

Thanks. I will try that.

dannybloe commented 1 year ago

Would be nice if the sensors are marked with the proper state_class (measurement). Shouldn't be that hard. That way they can be used for statistics.

zxdavb commented 1 year ago

Thanks for your request.

As far as I know, statistics are limited to BinarySensor and Sensor entities, but evohome only has Climate entities.

I would have thought that the current_temperature on a climate entity would have been a prime candidate for stats - but that is an architectural issue.

I do not feel adding a Sensor entity to evohome is appropriate.

Thus, the above template sensor is the most appropriate solution.

Please do reply if I am wrong (quite possible), and you have better information.

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.