Skip to content

state_trigger with state_check_now=True and state_hold_false=0 #95

Closed
@dlashua

Description

@dlashua

I use state_check_now on a @state_trigger to mean, I recently changed something or I just restarted Home Assistant and I want this trigger to be evaluated right now and to execute the method if it's true.

And state_hold_false just keeps the method from triggering again when it doesn't really have anything to do.

However, as indicated in the docs, using these two together, means that if the trigger evaluates to true at startup, it will NOT execute the method. I think that it should.

In other words, state_check_now should ignore state_hold_false when evaluating at startup. I can't think of a situation where the current mode of operation is useful: a scenario where I want it evaluated RIGHT NOW, but not EXECUTED if it's True.

This is easily worked around in code, so it isn't a problem if it gets left the way it is. I just haven't found a use for it yet, but I've several times written extra code to make it behave the way I expect it to (i.e. I don't use state_hold_false and instead implement that same functionality in the method or with state_active).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions