Closed richard-c-howlett closed 3 years ago
Use value_template
with the home_assisstant_start
event. initial_value
is only evaluated once in the life of the variable unless restore
is set to false
. You could try that as well.
Thank you for reply.
I decided to use "restore: false" and it now works exactly as intended. I did see the restore option in the configuration guide but it didn't twig that using it would fix the issue! Anyway all working now - thank you.
Cheers Richard
On Thu, 1 Jul 2021 at 15:13, snarky-snark @.***> wrote:
Use value_template with the home_assisstant_start event. initial_value is only evaluated once in the life of the variable unless restore is set to false.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/snarky-snark/home-assistant-variables/issues/56#issuecomment-872282582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQYSTAB34BEJTIDJYKANOT3TVRZV7ANCNFSM47UW226Q .
Great!
Hi,
Having a problem with the “var” custom_component. I have it installed to track version numbers of modules/packages I write which then get displayed on my dashboard. I was using rogro82’s “variable” component but have recently changed to your one which appears to be a better component moving forward.
At the top of each package I have something like:
When I make a code change I update the version and date. With the old “variable” component the new value was accepted and duly displayed. Since switching to your “var” component the variable doesn’t change even though initial_value is used to set it. The very first setting of the variable remains.
I’ve tried adding:
tracked_event_type: homeassistant_start
in an attempt to force it to re-assign the initial_value but it makes no difference.
What am I doing wrong?
Cheers Rich