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
69.75k stars 28.91k forks source link

The Things Network device is not available #35557

Closed JoramQ closed 3 years ago

JoramQ commented 4 years ago

The problem

The Things Network integration is taking the information from The Things Network Data Integration. By default on a query to the API it will give you the data of the last hour. If there is no data in the last hour the API will return 204 no content. My sensor gives data every 4 hours so a big change that there is no data. Home assistant will catch this error and therefore not add the sensor in the system. Even if on a later time there is a value.

Environment

Home Assistant 0.109.6 (docker)

Problem-relevant configuration.yaml

Traceback/Error logs

The device is not available:

Additional information

I've fixed it for me to add the 'last' parameter as optional in the configuration and add this to the API request. So i can put the parameter at 4 hours and its working. I've put it in a branch for a change but I'm just not sure if this is the good solution. https://github.com/JoramQ/core/tree/ttn-api-last It might be possible to put the last parameter higher by default or maybe only on the first request. But these changes are a bit difficult for me to do.

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

thethingsnetwork documentation thethingsnetwork source (message by IssueLinks)

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.