False trigger when sensor becomes unavailable

The behavior I described is found in this PR:

This line:

Specifically, we do not want to trigger numeric_state when moving from true to unavailable and back to true

It was created as a result of this discussion in the Architecture repo:

However, I think it was superseded by another PR:

It appears to introduce the behavior you observed:

  • Entity available, condition matches → trigger
  • Entity becomes unavailable
  • Entity becomes available again → condition matches → trigger