Is there a way to use a boolean variable turning on to trigger a core update that is available? And a way to do the same with an operating system update? Basically so I can use a dashboard to apply updates without administrative privileges conditional upon another boolean variable to allow it.
As stated In the documentation: Home Assistant Supervisor - Home Assistant
It only has a service to update add-ons. Not the supervisor itself or HA for that matter.
Oh. So could I like find the link for update and them basically make home assistant trigger it like a webook?
I suspect that you can probably run “core update” though in the SSH and Terminal Addon, using STDIN?
What is that?
service: hassio.addon_stdin
data:
addon: "core_ssh",
input: "ha core update"
Can you do that to update the supervisor or operating system somehow?
Yup - type “ha” in to the ssh and terminal addon, and you can see all the things it can do.
Off my head though I believe it’s:
ha core update
to update the core.
ha supervisor update
to update the supervisor and
ha os update
to update the operating system.
Is there a way I can make a script or something that automatically get executed to run the command upon a boolean variable being turned on?
Yup, it’s just an automation with a call service action.
with that:
service: hassio.addon_stdin
data:
addon: "core_ssh",
input: "ha core update"
as the call service
Ooohhhhhh, sorry I totally misunderstood. I think I
Got it now, can you test it if you don’t have an update to apply at the time somehow?
Yeah so that didn’t work, I even manually entered it into terminal