enkama / hass-variables

Home Assistant variables component
90 stars 12 forks source link

Adding attributes to existing structure does not show up #43

Closed frank-dusign closed 1 year ago

frank-dusign commented 1 year ago

3.01 on 2023.3.1 Having setup a 'sensor.room' with 2 attributes using the integration dialog. Works fine and shows up in developer tools state dialog. now I tried to a third attribute. If I add it in integration, it does not show up in dev tools state or anywhere else. restarting HA, does not show up in dev tools state. adding it in dev tools state works. So currently it has to be setup in two location - integration and dev tools state -quite cumbersome. Changing an attribute value in integration has effect. I think attributes is not final.

otherwise nice work, even if there is a lot work in conversion to be doen in my HA, about 20 variable with 15 attributes.

Snuffy2 commented 1 year ago

Updating the value or attributes in the Variables Options will not actually change the actual sensor value or attributes. It only changes the initial value and attributes which is typically only of value if Restore on Reboot is False as then the Variable will be set to the Initial Value and Attributes on restart.

To change the actual/current value and attributes, use the variable.update_ service calls.

I'll work to improve the documentation in the Readme and in the UI bout this.

frank-dusign commented 1 year ago

Thanks for explaining. Would be a nice feature to add attributes in the UI.