ciejer / metservice-weather

Metservice New Zealand component for Home Assistant
MIT License
17 stars 0 forks source link

Weather Warnings showing "unknown" after issuing 1 warning #47

Open seanmccabe opened 8 months ago

seanmccabe commented 8 months ago

System Health details

System Information

version core-2023.12.4
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 5.15.0-92-generic
arch x86_64
timezone Pacific/Auckland
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4996 Installed Version | 1.33.0 Stage | running Available Repositories | 1409 Downloaded Repositories | 53
AccuWeather can_reach_server | ok -- | -- remaining_requests | 15
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 3 -- | -- resources | 29 views | 24 mode | storage
Recorder oldest_recorder_run | 1 March 2024 at 03:24 -- | -- current_recorder_run | 2 March 2024 at 14:06 estimated_db_size | 2942.77 MiB database_engine | mysql database_version | 11.2.2
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

Integration with the entity "warnings" is showing unknown now that 1 warning and 2 watches have been issued.

Warning and Issue shown here: https://www.metservice.com/towns-cities/regions/wellington/locations/wainuiomata

Screenshot_20240303_205655_Home Assistant

Reproduction steps

  1. Warning issue by Metservice
  2. Integration updates on schedule
  3. Entity displays unknown

Debug logs

No response

Diagnostics dump

No response

NZReDa commented 3 months ago

The problem is the length of the field state. Can you please fix? homeassistant.exceptions.InvalidStateError: Invalid state with length 327. State max length is 255 characters.

Logger: homeassistant.helpers.entity Quelle: helpers/entity.py:1205 Erstmals aufgetreten: 28. Juli 2024 um 20:33:11 (74 Vorkommnisse) Zuletzt protokolliert: 29. Juli 2024 um 20:51:01

Failed to set state for sensor.metservice_nelson_metservice_weather_warnings, fall back to unknown Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1205, in _async_write_ha_state hass.states.async_set( File "/usr/src/homeassistant/homeassistant/core.py", line 2302, in async_set state = State( ^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 1773, in init validate_state(state) File "/usr/src/homeassistant/homeassistant/core.py", line 239, in validate_state raise InvalidStateError( homeassistant.exceptions.InvalidStateError: Invalid state with length 327. State max length is 255 characters.