enkama / hass-variables

Home Assistant variables component
89 stars 12 forks source link

Setting to blank sets to 'unknown' #89

Closed rwarner closed 1 year ago

rwarner commented 1 year ago

Thanks for forking and continuing to work on this from rogro82's

Since moving over to this forked repo, I noticed that when I variable.update_sensor to nothing at all (i.e. "") It seems to set the state to unknown

- service: variable.update_sensor
      data:
        value: ""
      target:
        entity_id: sensor.value

Not sure if this is intentional. I tweaked some of my logic in my automations to accommodate but thought I'd report.

Snuffy2 commented 1 year ago

I did do it intentionally and set "" to None (which shows as Unknown in the HA UI). If there is consensus that it should remain as "", I don't feel that strongly. It was just the way I had built it when trying to catch edge cases and ensure the value is cleared out when needed.

rwarner commented 1 year ago

No worries then if it was done intentionally. Thought I'd reach out just in case.