Closed blackie333 closed 6 months ago
v0.15.1 was broken. Try v0.15.2.
v0.15.2 tested but unfortunately issue remains. Template values still got reset during HA Core restart.
same error in v0.15.1 & v0.15.2 variable value is empty go back to old release v0.15.0
alias: vartest
description: ""
trigger: []
condition: []
action:
- service: var.set
data:
entity_id: var.pmx152
value: test
- if:
- condition: state
entity_id: var.pmx152
state: test
then:
- service: notify.persistent_notification
metadata: {}
data:
message: OK
else:
- service: notify.persistent_notification
metadata: {}
data:
message: NIO
mode: single
I'm seeing the same problem. Variables are not restored after restarting HA. I tried adding the 'restore: true' flag but it had no effect. I also tried removing and reinstalling variable with no change. Every reboot clears the variables I have created.
How do you revert to a prior version through HACS? I know I can do this manually.
How do you revert to a prior version through HACS? I know I can do this manually.
Select the installed variable module in your HACS repositoy. On the module page select the context menu (three dots) in the upper right corner. There you find the Redownload function and can pick the version you want to downgrade to.
I also had to revert to 15.0, all my variable get reset after a reboot as well.
Try v0.15.3.
See #112.
Thanks. 0.15.3 seems to work fine again, no values lost during HA restart.
Hello, use variables for holding some long-term values which worked great. After latest upgrade my variables values became reset to empty string after HA restart. Seems like value automatic update via template won't work as before for tracked_entity updates. I want to return old value if group state condition is not met but old value gets lost. please fix this.
var: last_motion_time: friendly_name: "Last Motion Time" restore: true value_template: >- {% if is_state('group.grp_motion_sensors_all', "on") %} {{ states.sensor.date_time.state }} {% else %} {{ states('var.last_motion_time') }} {% endif %} icon: mdi:motion-sensor-off tracked_entity_id:
group.grp_motion_sensors_all
last_alarm_time: friendly_name: "Last Alarm Time" restore: true value_template: >- {% if is_state('alarm_control_panel.home_alarm', "triggered") %} {{ states.sensor.date_time.state }} {% else %} {{ states('var.last_alarm_time') }} {% endif %} icon: mdi:alarm-light-off-outline tracked_entity_id: