esphome / esphome/feature-requests

Globals trigger

Open
#2,443 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Describe the problem you have/What new integration you would like

I think a trigger on global vars changes would be useful. I have some computed vars that depend on global vars that need to be evaluated every time a global var change.
I would have a on_value trigger on global variables to execute a script that re-evaluated the computed values.

Please describe your use case for this integration and alternatives you've tried:

As a workaround, at least for boolean computed values, I use template binary sensors that are updated every loop. This does not seems to be very efficient and is valid only for boolean values.
For example, if I would like to have a "status" text sensor that depends on different variables, I would not be able to use the workaround.

Additional context

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are identified. Start by tracing how global variables, on_value triggers, and computed or template values are implemented, then clarify the intended trigger semantics and evaluation behavior with maintainers before defining what done means.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.