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
71.13k stars 29.81k forks source link

[ONVIF] 'NoneType' object has no attribute 'tzinfo' #37197

Closed Supavitax closed 3 years ago

Supavitax commented 4 years ago

The problem

I have two FLIR IP cameras and one of them works fine but the other has issues with motion triggers. Motion alarm is never triggered. I have checked the timezone on both of the cameras and they're exactly the same.

Environment

Problem-relevant configuration.yaml

Traceback/Error logs

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/onvif/event.py", line 126, in async_pull_messages
    dt_util.as_utc(response.TerminationTime) - dt_util.utcnow()
  File "/usr/src/homeassistant/homeassistant/util/dt.py", line 68, in as_utc
    if dattim.tzinfo == UTC:
AttributeError: 'NoneType' object has no attribute 'tzinfo'

Additional information

probot-home-assistant[bot] commented 4 years ago

Hey there @hunterjm, mind taking a look at this issue as its been labeled with an integration (onvif) you are listed as a codeowner for? Thanks! (message by CodeOwnersMention)

stale[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.