custom-components / weatheralerts

A sensor that gives you weather alerts from alerts.weather.gov.
MIT License
125 stars 15 forks source link

error without further content #27

Closed Mariusthvdb closed 4 years ago

Mariusthvdb commented 4 years ago

Version of the custom_component

Describe the bug A clear and concise description of what the bug is. Not sure, but the sensor is not created and an empty error is displayed in the log

config is: HA Hassio, Rpi4 103.5

sensor:
# https://github.com/custom-components/weatheralerts
# New Orleans, Louisiana
  - platform: weatheralerts
    state: LA
    zone: 62

tried it with'062' also, same error

Log

Add your logs here.

Schermafbeelding 2020-01-02 om 11 35 47 Schermafbeelding 2020-01-02 om 11 35 53

ludeeus commented 4 years ago

Get the error from the logfile, the UI hides stuff from you.

ludeeus commented 4 years ago

oh... and activate debug logging for it.

Mariusthvdb commented 4 years ago

without debug, no further info in the logfile as far as I can see. will try again with debugging, like this?:

custom_components.weatheralerts: debug

update

nothing in the logs at all, except what's in the first post

2020-01-02 12:43:46 ERROR (MainThread) [custom_components.weatheralerts.sensor] 

tried

custom_components.weatheralerts.sensor: debug

too, no further info reported

ludeeus commented 4 years ago

Last one should have more. Unless it reaches a timeout. Will have a look later today

ludeeus commented 4 years ago

Your config works for me

2020-01-02 21:59:55 DEBUG (MainThread) [custom_components.weatheralerts.sensor] {'type': 'FeatureCollection', 'features': [], 'title': 'current watches, warnings, and advisories for Orleans (LAZ062) LA', 'updated': '2020-01-02T21:27:00+00:00'}
2020-01-02 21:59:55 INFO (MainThread) [custom_components.weatheralerts.sensor] Added sensor with zoneid 'LAZ062'

Pushed a version with a little more logging now you can try.

Mariusthvdb commented 4 years ago

Ok thanks, will do. Just to be sure: my HA instance isn't in LA of course, I just picked a random valid combination. That shouldn't matter should it?

only this, timeout error:

2020-01-02 23:40:08 ERROR (MainThread) [custom_components.weatheralerts.sensor] [TimeoutError] 

checked the same config on another (almost empty) HA instance and got this nice sensor.orleans:

Schermafbeelding 2020-01-02 om 23 58 30

and log:

2020-01-03 00:02:06 DEBUG (MainThread) [custom_components.weatheralerts.sensor] {'type': 'FeatureCollection', 'features': [], 'title': 'current watches, warnings, and advisories for Orleans (LAZ062) LA', 'updated': '2020-01-02T21:27:00+00:00'}
2020-01-03 00:02:06 INFO (MainThread) [custom_components.weatheralerts.sensor] Added sensor with zoneid 'LAZ062'

Would this indicate the startup sequence of my other (fully loaded) system is taking too much time for the Custom component to setup correctly? btw, the title isn't set as an attribute of the sensor, can we find that elsewhere?

ludeeus commented 4 years ago

I'm in Norway, so that should not be an issue ;)

Mariusthvdb commented 4 years ago

yep, it isnt ;-) even Norway;-) I am in the Netherlands, so go figure....

seriously, I think the startup sequence is the issue here, could it be taken care of? at least have the integration do another try after all has settled down after startup? Maybe a bit like the api rest sensor that errors out during the same sequence, for the system not being ready yet, but after that initializes nicely?

ludeeus commented 4 years ago

maybe

What do you see in the logs now with debug active?

Mariusthvdb commented 4 years ago

as said, only this:

2020-01-07 18:11:28 ERROR (MainThread) [custom_components.weatheralerts.sensor] [TimeoutError] 
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Mariusthvdb commented 4 years ago

please keep open, still no sensor created on 104.3

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.