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
73.74k stars 30.85k forks source link

Tomorrow.io integration is missing many data fields #103341

Closed extesy closed 1 year ago

extesy commented 1 year ago

The problem

Tomorrow.io free core layer contains a lot of data which is not exposed as sensors by the current integration. For example: precipitationProbability, precipitationIntensity, windSpeed, windDirection, 'visibility' and others. Can they be added to the integration?

What version of Home Assistant Core has the issue?

core-2023.11.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

tomorrow.io

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tomorrowio/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Sample response from tomorrow.io directly API call:

        "values": {
            "cloudBase": null,
            "cloudCeiling": null,
            "cloudCover": 0,
            "dewPoint": -0.81,
            "freezingRainIntensity": 0,
            "humidity": 35,
            "precipitationProbability": 0,
            "pressureSurfaceLevel": 1024.7,
            "rainIntensity": 0,
            "sleetIntensity": 0,
            "snowIntensity": 0,
            "temperature": 13.38,
            "temperatureApparent": 13.38,
            "uvHealthConcern": 0,
            "uvIndex": 0,
            "visibility": 16,
            "weatherCode": 1000,
            "windDirection": 236.13,
            "windGust": 6.63,
            "windSpeed": 3
        }
home-assistant[bot] commented 1 year ago

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

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

(message by CodeOwnersMention)


tomorrowio documentation tomorrowio source (message by IssueLinks)

lymanepp commented 1 year ago

They are already in the integration. Some are attributes of the weather entity and some are attributes of a forecast interval. Use Developer tools -> States to find what you're looking for.

extesy commented 1 year ago

@lymanepp Thank you, the weather entity has them indeed. They are not in the list of entities exposed by the integration when I open it in Integrations->tomorrow.io->28 entities so I thought it's not collecting them: image image

extesy commented 1 year ago

@lymanepp Actually it looks like it's impossible to see history of various attributes under the weather entity. For example, in the "history" view I can see the history of changes for "tomorrow.io - wind gust" sensor, but "tomorrow.io - daily" weather entity only shows sunny/cloudy state change and I can't see the history of wind speed, for example. Can those become their own independent sensors in addition to bundling them into a single weather entity?

lymanepp commented 1 year ago

Use template sensors to make sensors out of attributes.

template:
  - sensor:
      - name: "Wind Speed"
        unit_of_measurement: "mph"
        state_class: "measurement"
        state: >
          {{ state_attr("weather.tomorrow_io",  "wind_speed") }}