Closed BillyFKidney closed 2 years ago
I don't think it is possible to add a unique id here. The sensor is different from others since there is no integration for it. The add-on simply posts the values via the Home Assistant API, which is - by the way - the reason why the sensor gets lost as soon as Home Assistant is restarted.
I don't think it is possible to add a unique id here. The sensor is different from others since there is no integration for it. The add-on simply posts the values via the Home Assistant API, which is - by the way - the reason why the sensor gets lost as soon as Home Assistant is restarted.
Gotcha, I tried to setup a Sensor Template but that didn't go well. :(
I did follow your instructions on an automation to ensure the sensor is available. Thanks for that!
alias: Startup - Restore Samba Backup Sensor
description: >-
There is a known limitation that the sensor will be unavailable if you restart
Home Assistant. This is caused by the way Home Assistant handles sensors which
are not backed up by an entity, but instead come from an add-on or AppDaemon.
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- sensor.samba_backup
attribute: state
to: unavailable
condition: []
action:
- service: hassio.addon_stdin
data:
addon: 15d21743_samba_backup
input: restore-sensor
mode: single
I tried to setup a Sensor Template but that didn't go well
What are you trying to achieve with the template?
I tried to setup a Sensor Template but that didn't go well
What are you trying to achieve with the template?
I like being able to assign areas to all the entities, makes it a lot easier to sort / filter.
Ok I understand. Areas are a UI-only feature and cannot be defined in yaml (at least to my knowledge), so unfortunately this won't be possible with the Samba Backup sensor.
I'm closing this issue since adding unique ids is not possible for add-ons. We would need an integration on Home Assistant side for this to work, which is out of the scope of this addon.
The Samba Backup does not have a unique ID, preventing the settings from being modified within the UI.
During installation if a unique ID is created additional configuration settings will become available, such as area: