Closed Appie-rappie closed 1 year ago
Hey there @epenet, mind taking a look at this issue as it has been labeled with an integration (rest
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
rest documentation rest source (message by IssueLinks)
Hey there @gjohansson-st, mind taking a look at this issue as it has been labeled with an integration (command_line
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
command_line documentation command_line source (message by IssueLinks)
I think there are two issues that should really be tracked separately: one is the ambeedata issue, and one is the reload issue.
Regarding ambeedata: the first thing that I recommend is to move from the platform key configuration to the integration key configuration (from sensor -> rest
to rest -> sensor
) See https://www.home-assistant.io/integrations/rest
You should also add an availability
template, to ensure that {{ state_attr("zone.home", "latitude") }}
is a number before sending ambeedata
requests.
Regarding reload, please look at #93538 which attempts to fix reload issues.
Sounds very plausible, all the more as I discovered that in the old situation it also only worked after a quick restart. Sorry for not noticing it sooner. Thanks! I implemented your suggestions in version 2023.5.4 and have it working, also on the first start. I suppose that's one problem solved.
I'm still hesitant to upgrade to 2023.06 as I suspect the command line sensors would still not work after a quick restart.
I think there are two issues that should really be tracked separately: one is the ambeedata issue, and one is the reload issue.
Regarding ambeedata: the first thing that I recommend is to move from the platform key configuration to the integration key configuration (from
sensor -> rest
torest -> sensor
) See https://www.home-assistant.io/integrations/rest You should also add anavailability
template, to ensure that{{ state_attr("zone.home", "latitude") }}
is a number before sendingambeedata
requests.Regarding reload, please look at #93538 which attempts to fix reload issues.
Why is rest -> sensor
configuration preferred and is this documented somewhere? In the Restful HA docu it is not mentioned that sensor -> rest
could make problems, but it is advised to use it when only adding one sensor via rest interface...
rest -> sensor/binary_sensor
has automatic support for multiple entities with the same resource
so if you download a JSON with multiple values you can use that single resource with lots of sensors+binary sensors
sensor -> rest
is being phased out on every integration (not just rest)
It will be fully deprecated once switch and notify platforms are migrated.
Hi @gjohansson-ST, do you think the problem of these command-line lines not working anymore after a quick reload is solved? I'm still reverted to version 2023.5.4, as I need the integration with my 433 MHz hub that these lines represent to work.
See here for the reload issue. I will close this issue now as it's tracked in the other one. Thanks
The problem
Starting version 2023-06, I'm unable to get two elements of my configuration.yaml working at the same time. One element is a REST interface to Ambeedata, the other is a command line interface with a 433MHz hub. Both work, just not at the same time. When I restart HA, the 433MHz hub works, but not Ambeedata. When I quick reload the configuration, it's the other way around.
Configuration below was edited to reflect the changes in command line structure, but the original configuration behaves exactly the same in version 2023.06 and works without problems in version 2023.5.4.
Below the two snippets from my configuration.yaml file.
What version of Home Assistant Core has the issue?
2023-6
What was the last working version of Home Assistant Core?
2023.5.4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
REST, command line
Link to integration documentation on our website
https://www.home-assistant.io/integrations/rest/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response