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
72.71k stars 30.45k forks source link

AEMET Integration AttributeError: 'Station' object has no attribute 'pressure' #105305

Closed mabusdogma closed 10 months ago

mabusdogma commented 10 months ago

The problem

Logger: homeassistant.components.aemet.weather_update_coordinator Source: helpers/update_coordinator.py:300 Integration: AEMET OpenData (documentation, issues) First occurred: 1:16:32 a. m. (106 occurrences) Last logged: 3:10:58 p. m.

Unexpected error fetching aemet data: 'Station' object has no attribute 'pressure' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/aemet/weather_update_coordinator.py", line 147, in _async_update_data return self._convert_weather_response(weather_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/aemet/weather_update_coordinator.py", line 250, in _convert_weather_response data = self.aemet.data() ^^^^^^^^^^^^^^^^^

Since 6/12/2023, I can't use AEMET Integration.

This is the log error

File "/usr/local/lib/python3.11/site-packages/aemet_opendata/interface.py", line 227, in data data[AOD_STATION] = self.station.data() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aemet_opendata/station.py", line 248, in data pressure = self.get_pressure() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aemet_opendata/station.py", line 135, in get_pressure return self.pressure ^^^^^^^^^^^^^ AttributeError: 'Station' object has no attribute 'pressure'

What version of Home Assistant Core has the issue?

Core-2023.12.0

What was the last working version of Home Assistant Core?

Core-2023.11.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

AEMET

Link to integration documentation on our website

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

Diagnostics information

Logger: homeassistant.components.aemet.weather_update_coordinator Source: helpers/update_coordinator.py:300 Integration: AEMET OpenData (documentation, issues) First occurred: 1:16:32 a. m. (106 occurrences) Last logged: 3:10:58 p. m.

Unexpected error fetching aemet data: 'Station' object has no attribute 'pressure' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/aemet/weather_update_coordinator.py", line 147, in _async_update_data return self._convert_weather_response(weather_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/aemet/weather_update_coordinator.py", line 250, in _convert_weather_response data = self.aemet.data() ^^^^^^^^^^^^^^^^^

Since 6/12/2023, I can't use AEMET Integration.

This is the log error

File "/usr/local/lib/python3.11/site-packages/aemet_opendata/interface.py", line 227, in data data[AOD_STATION] = self.station.data() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aemet_opendata/station.py", line 248, in data pressure = self.get_pressure() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/aemet_opendata/station.py", line 135, in get_pressure return self.pressure ^^^^^^^^^^^^^ AttributeError: 'Station' object has no attribute 'pressure'

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.aemet.weather_update_coordinator
Source: helpers/update_coordinator.py:300
Integration: AEMET OpenData (documentation, issues)
First occurred: 1:16:32 a. m. (106 occurrences)
Last logged: 3:10:58 p. m.

Unexpected error fetching aemet data: 'Station' object has no attribute 'pressure'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/aemet/weather_update_coordinator.py", line 147, in _async_update_data
    return self._convert_weather_response(weather_response)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/aemet/weather_update_coordinator.py", line 250, in _convert_weather_response
    data = self.aemet.data()
           ^^^^^^^^^^^^^^^^^

Since 6/12/2023, I can't use AEMET Integration.

This is the log error

 File "/usr/local/lib/python3.11/site-packages/aemet_opendata/interface.py", line 227, in data
    data[AOD_STATION] = self.station.data()
                        ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aemet_opendata/station.py", line 248, in data
    pressure = self.get_pressure()
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aemet_opendata/station.py", line 135, in get_pressure
    return self.pressure
           ^^^^^^^^^^^^^
AttributeError: 'Station' object has no attribute 'pressure'

Additional information

No response

home-assistant[bot] commented 10 months ago

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

Code owner commands Code owners of `aemet` 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 aemet` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


aemet documentation aemet source (message by IssueLinks)

mancontr commented 10 months ago

Seems like a duplicate of #105168

mabusdogma commented 10 months ago

One case is 'no attribute dew point', another is 'no attribute pressure', not sure if it's the same.

I saw the other one, but just in case I opened this issue.

Cheers,

El sáb, 9 dic 2023, 3:00 a. m., Anxo @.***> escribió:

Seems like a duplicate of #105168 https://github.com/home-assistant/core/issues/105168

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/105305#issuecomment-1848085634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESCMAUPRM5XTMOCXDTAVJTYIPA2PAVCNFSM6AAAAABAMXFLOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGA4DKNRTGQ . You are receiving this because you authored the thread.Message ID: @.***>

afharo commented 10 months ago

The PR mentioned in https://github.com/home-assistant/core/issues/105168#issuecomment-1847177182 should also fix the missing pressure problem.

You can apply the code changes in your installation as a workaround while it is released in Home Assistant.

afharo commented 10 months ago

It should be resolved by https://github.com/home-assistant/core/pull/105676

Can anyone close this issue? cc @frenck?

Noltari commented 10 months ago

@home-assistant close