awareness_type property seems to be mandatory
viktak opened this issue · comments
when using this integration without specifying awareness_types
, I get the following error:
Source: config.py:416
First occurred: 8:20:40 AM (1 occurrences)
Last logged: 8:20:40 AM
Invalid config for [binary_sensor.meteoalarmeu]: value must be one of ['Avalanches', 'Coastal Event', 'Extreme high temperature', 'Extreme low temperature', 'Flood', 'Fog', 'Forestfire', 'Rain', 'Rain-Flood', 'Snow/Ice', 'Thunderstorms', 'Wind'] @ data['awareness_types'][0]. Got None. (See /config/configuration.yaml, line 113). Please check the docs at https://github.com/xlcnd/meteoalarmeu```
My config:
```binary_sensor:
- platform: meteoalarmeu
country: 'GR'
region: 'Attiki'
If I also specify (all the) awareness_type
s, it works properly.
Please, update to Release v2021.2.2.
You are right! I will fix that... Thanks!
awareness_types
were declared optional but then they are mandatory! A bug in HA?
@xlcnd I just did the update, and it is now NOT mandatory. Check configuration
doesn't report it wrong.
However, if I don't specify it, I don't get any updates from the service. Sometimes I get Bad response
in the logs, sometimes not. I tried it several times and when I specify awareness_types
, it consistently succeeds in getting me updates, without it consistently fails.
I will check the issue...
@xlcnd Thanks for investigating this.
I just got this error again, so I can give you the exact message from the log:
Source: custom_components/meteoalarmeu/binary_sensor.py:116
Integration: meteoalarmeu (documentation, issues)
First occurred: 9:46:16 AM (1 occurrences)
Last logged: 9:46:16 AM
Bad response from meteoalarm.eu
Please, can you test it with the Release v2021.2.3?
By the way, the server meteoalarm.eu has been with intermittent problems, so some of those error messages are OK. Another thing that could happen is the 'binary_sensor' be 'unavailable'. That is OK if the server has problems.
Thanks! There was a real issue caused by a last minute (innocent) change from a list to a tuple...
What I was referring to was messages like Bad response from meteoalarm.eu
that are caused by the server.
Once more Thank You.