jseidl / hass-magic_areas

Areas with batteries included for Home Assistant
MIT License
273 stars 28 forks source link

Bug: Dead lock when Magic area is assigned to its Area #255

Closed juacas closed 9 months ago

juacas commented 2 years ago

Describe the bug When a"magic Area Entity" is assigned to its Area and it is activated ("on"), it never goes off because it detects itself as a valid entity for calculating the new state.

To Reproduce Steps to reproduce the behavior:

  1. Assign a Magic Area Entity to its represented HA Area
  2. Make the MAgic Areato enter the "on" state.
  3. See that neves goes "off". Logs shows that the reason is its own previous state.

Expected behavior A Magic Area should ignore itself when checking the states.

Additional context Adding a Magic Area to the HA Area allow to be browsed easier. I fact, I suggest that a Magic Area Entity registers itself in the actual Area by default.

Thanks for this component.

jseidl commented 2 years ago

That's true, I do need to add some logic to prevent this from happening. Thanks for opening the ticket!

jseidl commented 9 months ago

This is fixed by #300