Regarding
as I don’t like to have that additional piece and also bind to my user account:
What about simply using the Supervisor token as e. g. @CentralCommand does (did) with
(first post, unfold Original Package for HA prior to 2022.4.0
, unfold Update Notifications package
):
command: 'curl http://supervisor/supervisor/info -H "Authorization: Bearer $(printenv SUPERVISOR_TOKEN)" | jq ''{"newest_version":.data.version_latest,"current_version":.data.version,"update_available":.data.update_available,"addons":[.data.addons[] | select(.update_available)]}'''
Looking at this part:
Authorization: Bearer $(printenv SUPERVISOR_TOKEN)
…which is pretty much following Authentication API | Home Assistant Developer Docs which is linked in the profile section at long lived tokens section at the bottom.
- Can this be used together with a rest sensor?
- Or is this specifically only for command_line sensors, as only there the SUPERVISOR_TOKEN is available in the environment the command is run?