cyberjunky / home-assistant-fireservicerota

:fire_engine: This component tracks incidents from brandweerrooster.nl and fireservicerota.co.uk
MIT License
9 stars 2 forks source link

Sensor.Incidents not updating #16

Closed genaxx closed 3 years ago

genaxx commented 3 years ago

The sensor.Incidents sensor has been stuck since it updated to an incident back on 2nd Jan. Even after restarting HA the sensor hasn't reset back to its default state, nor has it updated to incidents which have happened between then and now.

cyberjunky commented 3 years ago

Can you check if there are more incidents sensors? Like sensor.incidents2 or something like that? Else enable debug and restart to see whats going on in log (see end of document page)

genaxx commented 3 years ago

I'm only seeing 3 entities; binary_sensor.duty switch.incident_response sensor.incidents

i'll enable debug and give an update.

genaxx commented 3 years ago

Here's the logs,

This is what the sensor.Incident Entity is saying;

State: "Title of last incident"

State Attributes:

id: 53884
trigger: update
created_at: '2021-01-02T05:11:06.336+00:00'
message_to_speech_url: >-
  https://static.fireservicerota.co.uk/incidents/000/053/884/incident-text-to-speech
type: incident_alert
responder_mode: available_in_schedule_is_acknowledgment
can_respond_until: '2021-01-02T05:41:06.336+00:00'
friendly_name: Incidents
icon: 'mdi:fire-truck'

Log shows that it's also being restored; 2021-01-11 18:58:22 DEBUG (MainThread) [homeassistant.components.fireservicerota.sensor] Restored entity 'Incidents' to: #### AFA [####]

FSRdebug.txt

cyberjunky commented 3 years ago

I see nothing strange in this log, the ping lines mean the websocket client is connected to the server and is awaiting new incidents.

genaxx commented 3 years ago

I've tried deleting the integration and re-adding it but no luck either

cyberjunky commented 3 years ago

If there is no new event received the incident sensor stays on what is was before. Restarts in between will keep the same state (it's saved and reloaded) What do you expect the sensor value to be?

genaxx commented 3 years ago

Would it not reset to some default state once the incident clears? At the moment it appears like that incident has been going on since the 2nd Jan as its still the current state. But it also missed some incidents that have happened after that one, e.g on the 4th and 7th.

cyberjunky commented 3 years ago

No updates, closing

jtbmedia commented 3 years ago

Hi Cyberjunky,

I have exactly the same problem. It only updated the incidents sensor once. When new incidents are coming they are not updated. I can see them in my brandweerrooster app.