Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automation reload triggers state change from original value, to unknown, to original value #119

Open
Brucepbd opened this issue Nov 28, 2024 · 0 comments

Comments

@Brucepbd
Copy link

My var definition:

electricity_price_peak:
friendly_name: Electricity Price peak
unit_of_measurement: "USD/kWh"
icon: mdi:application-variable-outline

When triggering an automation on a var change like this:
triggers:

  • trigger: numeric_state
    entity_id:
    • var.electricity_price_peak

And I do a home assistant quick reload, it triggers the automation. The first trigger looks like it's from var.electricity_price_peak='unknown'. The next trigger is var.electricity_price_peak= back to it's restored/original value before the reload.

The work around I am using is don't trigger on vars. Trigger on something built into home assistant, like this:

triggers:

  • trigger: state
    entity_id:
    • input_boolean.flag_seasonal_electric_rate_change

For some reason vars change state twice during a quick reload. input_boolean or I suspect other things built into home assistant don't trigger state changes during reload.

If anyone knows about another work around or something I'm doing wrong or if this is a bug. Please post.

Also, thanks for making the integration! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant