Releases: jseidl/magic-areas
4.4.1
This is a minor bugfix update fixing an issue with the new area reload functionality that causes high-load when reloading.
As a side update, @VPelt added the FAN domain to the list of allowed entities in the "Include entities" option. Thanks!
🐛 Bug Fixes
- Prevent magic areas from reloading on its own entity changes and before HA is fully initialized @jseidl (#553)
Changes
- allow fan.somefan entities to be selected as included entities @VPelt (#555)
- Bump actions/setup-python from 5 to 6 @dependabot[bot] (#557)
4.4.0
Hello Wizards! 🧙♂️ This release brings a little extra magic to your homes. ✨
We’ve banished the race condition gremlins once and for all! Areas now reload at just the right moments — after Home Assistant finishes starting, when entities or devices are added or move between areas, and when configurations are updated.
The magic doesn’t stop there: meta areas, including floors, now automatically reload whenever one of their child areas reloads. No more manual reloads to catch all your entities — the system handles it for you, smoothly and reliably.
On top of that, Wasp in a Box has learned a new trick: a configurable timeout that prevents motion flickers from spoiling the spell. Add in fresh translations and a shiny README, and you’ve got a release full of stability, polish, and a touch of magic.
Thanks again our community members @andreasbrett for updating the German translations for the new "Wasp Timeout" field and @Julien-Decoen for helping with the area reload rework and beta-testing❤️
🚀 Features
🐛 Bug Fixes
🧰 Chores
- DE translation for wasp timeout @andreasbrett (#551)
- README revamp @jseidl (#549)
- Bump actions/checkout from 4 to 5 @dependabot[bot] (#545)
- Bump actions/setup-python from 4 to 5 @dependabot[bot] (#544)
- Update pre-commit requirement from ~=4.2 to ~=4.3 @dependabot[bot] (#543)
4.3.1
This is a minor update to prevent a bug on upcoming version of home assistant 2025.8. The core recently had a change to how Threshold Sensors are initialized.
Thanks @andreasbrett for updating the German translations ❤️
🐛 Bug Fixes
- Hotfix for upcoming changes in 2025.8.0b @jseidl (#541)
- DE translations for 4.3.0 @andreasbrett (#531)
Changes
- Update pygithub requirement from ~=2.6 to ~=2.7 @dependabot[bot] (#539)
- Update mypy requirement from ~=1.16 to ~=1.17 @dependabot[bot] (#537)
- Update ruff requirement from ~=0.11 to ~=0.12 @dependabot[bot] (#536)
- Update flake8 requirement from ~=7.2 to ~=7.3 @dependabot[bot] (#535)
- Update mypy requirement from ~=1.15 to ~=1.16 @dependabot[bot] (#532)
- Update pyupgrade requirement from ~=3.19 to ~=3.20 @dependabot[bot] (#530)
- Bump actions/setup-python from 5.5.0 to 5.6.0 @dependabot[bot] (#527)
- Update packaging requirement from ~=24.2 to ~=25.0 @dependabot[bot] (#526)
- Bump actions/setup-python from 5.4.0 to 5.5.0 @dependabot[bot] (#521)
- Update flake8 requirement from ~=7.1 to ~=7.2 @dependabot[bot] (#520)
- Update yamllint requirement from ~=1.36 to ~=1.37 @dependabot[bot] (#519)
- Update pre-commit requirement from ~=4.1 to ~=4.2 @dependabot[bot] (#518)
- Update ruff requirement from ~=0.9 to ~=0.11 @dependabot[bot] (#516)
- Update yamllint requirement from ~=1.35 to ~=1.36 @dependabot[bot] (#515)
4.3.0
This is a major update. Please read through the release notes and breaking changes especially. The docs/wiki was updated with information about the new features, please check it out if you have any questions or hop on our Discord server if you need additional help.
A huge thank you to everyone who helped test this version and shared their feedback allowing me to quickly validate the changes and release early!
The end of Climate Groups
Climate groups was an underutilized feature that did not performed climate control very well as it was limited to turning the climate devices on or off. I've made Climate Groups initially to control "Generic Thermostats" which I used to control fans based off a temperature sensor, so from concept, climate groups were never intended to be a real climate control solution but rather a fancy turn-on-and-off my fans.
Climate devices isn't something you usually group, even Home Assistant doesn't have support for grouping climate devices and I had to Frankenstein code in order to make it work. It was a sign to me that probably Climate Groups was a mistake, and it was.
Note
Although Climate groups is no longer available, two new features should pick up the slack and perform much, much better: Climate control & Fan groups.
Rest in peace Climate Groups, you won't be missed!
Fan groups
Fan groups are supposed to do what I used to do with the Generic Thermostat and Climate Groups. Fan groups can be tied to track a given aggregate sensor (say, temperature) and turn the grouped fans on or off based on a configured setpoint. It does basically the same as the duo mentioned before, but without the overhead of having to create a Generic Thermostat.
Climate control
Climate control is a feature that possibly most of the community have been looking for in terms of actually smart climate control. This feature allows you to map an area's states (both primary and secondary) to given presets of a climate device. You can now, for example (using "Interior" Meta-area):
- Set HVAC to
awaywhen your "Interior" area is clear - Set HVAC to
homewhen your "Interior" area is on "extended" state - Set HVAC to
sleepwhen your "Inteiror" area is on "sleep" state.
Tip
If you have multi-floor HVAC, you should use floor meta-areas and enable this feature on it. The controlled climate device does not need to be in the same area as the climate control feature.
Meta-area secondary states revamp
Meta-areas only really tracked primary states (occupied/clear). In this release, you can choose between 3 calculation modes and the meta-area's secondary states will be calculated off their children. The default calculation mode is called "majority" where if >50% of the child areas are on "sleep" state, so it will be the meta-area. Other available modes are all and any, which are self-explanatory.
Wasp-in-a-box
Probably the most upvoted feature ever on our feature request board must be the Wasp-in-a-box functionality. Well, now you have it!
Wasp-in-a-box is a great feature for when you have limited presence sensors (such as no mmWave) or in areas that are challenging to cover such as garages. To learn more about this feature, it's better to read on the wiki!
📄Wiki Article: Magic Areas in every room!
I've wrote a new wiki article with examples on how can you use Magic Areas in every type of room in your home, make sure to check it out!
⚠️ Breaking changes
update_intervaloption was removed. This option didn't bring a lot of value as a configuration parameter and is now hardcoded to one minute. If you had this configured to something else, well, it's one minute now 😛
🚀 Features
- Thermostat control @jseidl (#493)
- Fan groups @jseidl (#492)
- Wasp in a box feature @jseidl (#487)
- Removal of update_interval as an option @jseidl (#491)
- Secondary states for meta areas @jseidl (#504)
🐛 Bug Fixes
- Fix color mode resolution to not use deprecated constants @jseidl (#509)
- Add is_meta checks on switches that are not available to meta areas @jseidl (#503)
- Fix area default icon not showing up @jseidl (#502)
- Reduce aggregates default device classes @jseidl (#501)
🧰 Maintenance
- Migrate media player control logic from media player group into switch @jseidl (#500)
- Reorganize big components into packages @jseidl (#497)
- Translation update for entities' states and attributes + config flow selects @jseidl (#496)
- Reorganize tests @jseidl (#488)
- Basic light test @VPelt (#495)
- changes needed to make pytest work from dev container @VPelt (#494)
- Updating readme to add reference to wiki post with demo @jseidl (#490)
- Update pygithub requirement from ~=2.5 to ~=2.6 @dependabot[bot] (#485)
- Merge of Release/4.2.1 changes @jseidl (#486)
- Update mypy requirement from ~=1.14 to ~=1.15 @dependabot[bot] (#483)
- Bump actions/setup-python from 5.3.0 to 5.4.0 @dependabot[bot] (#482)
- Update black requirement from ~=24.10 to ~=25.1 @dependabot[bot] (#481)
4.2.1
What's Changed
Full Changelog: 4.2.0...4.2.1
4.2.0
Happy new year! This is a long due new release of Magic Areas with a couple new (exciting!) features, a bunch of bugfixes and some code improvements.
tl;dr: BLE Tracker support, Meta-areas now track Magic Entities, Magic Areas now auto-reloads on entity/device area change and can ignore diagnostic entities. Area-Aware media player and Climate Groups fixed. One entity_id has changed, see below!
⚠️ Theentity_id(andunique_id) for the "All Lights" entity for all Meta-Areas has changed as it was missing thetranslation_keythat every other entity has in order to support translation. This was missed when I first implemented translation and will not be changed again.
🚀 Features
- Ignore diagnostic and config entities @jseidl (#470)
- Support BLE Trackers as source of presence @jseidl (#467)
- Reload Magic Areas entry when entity registry is updated @jseidl (#422)
- Set control switches to CONFIG entity_category @jseidl (#415)
- Migration for meta areas to use magic entities only @jseidl (#458)
- feat(translation): add french translation file @Julien-Decoen (#410)
🐛 Bug Fixes
- Fix broken climate groups @jseidl (#469)
- Add translation key to meta "All lights" group @jseidl (#408)
- Fixing Area-Aware media player @jseidl (#460)
- Added logic to handle state class TOTAL INCREASING @jseidl (#453)
- Show correct icon for floor meta areas @jseidl (#452)
- Fixing entity id resolution for area aware media player @jseidl (#414)
Other Changes
- Update README.md @marcjay (#409)
- german translation for new auto-reload option @andreasbrett (#465)
- feat: Add french translation for auto-reload option @Julien-Decoen (#464)
- Revision of DE translation @andreasbrett (#462)
- Fix DE translation @andreasbrett (#459)
- feat(light): improve async_turn_on method @Julien-Decoen (#433)
- Simplify Devcontainer, Apply Standard Formatting, and Add VSCode Debugger Configuration @Julien-Decoen (#432)
- feat(translation): translate meta area name @Julien-Decoen (#427)
- Bump actions/checkout from 4.2.0 to 4.2.1 @dependabot (#426)
- Rename fr-FR.json to fr.json @Julien-Decoen (#423)
- Fix self._last_active_sensors not updating correctly in AreaStateTracker class @Julien-Decoen (#411)
- Update black requirement from ~=24.8 to ~=24.10 @dependabot (#425)
- Update pre-commit requirement from ~=3.8 to ~=4.0 @dependabot (#424)
- Bump actions/checkout from 4.1.7 to 4.2.0 @dependabot (#421)
- Update pylint requirement from ~=3.2 to ~=3.3 @dependabot (#418)
- Update mypy requirement from ~=1.13 to ~=1.14 @dependabot (#457)
- Bump softprops/action-gh-release from 2.1.0 to 2.2.0 @dependabot (#456)
- Update ruff requirement from ~=0.7 to ~=0.8 @dependabot (#449)
- Bump softprops/action-gh-release from 2.0.9 to 2.1.0 @dependabot (#445)
- Update pygithub requirement from ~=2.4 to ~=2.5 @dependabot (#444)
- Update packaging requirement from ~=24.1 to ~=24.2 @dependabot (#443)
- Update colorlog requirement from ~=6.8 to ~=6.9 @dependabot (#441)
- Bump softprops/action-gh-release from 2.0.8 to 2.0.9 @dependabot (#440)
- Update pyupgrade requirement from ~=3.18 to ~=3.19 @dependabot (#438)
- Update mypy requirement from ~=1.12 to ~=1.13 @dependabot (#437)
- Bump actions/setup-python from 5.2.0 to 5.3.0 @dependabot (#436)
- Bump actions/checkout from 4.2.1 to 4.2.2 @dependabot (#435)
- Update ruff requirement from ~=0.6 to ~=0.7 @dependabot (#434)
- Update mypy requirement from ~=1.11 to ~=1.12 @dependabot (#431)
- Update pyupgrade requirement from ~=3.17 to ~=3.18 @dependabot (#430)
4.1.0
This release brings up two new features/enhancements:
- Keep-only sensors: You can now select which presence sensors will be ignored unless the room is already occupied. This is super useful for flappy sensors such as mmWave and BLE trackers.
- Light threshold sensor now has configurable hysteresis. This will allow you to tune its "sensitivity" to changes.
Some fixes:
- Unit of measurement on sensors was kinda spotty. I've refactored the code to consider the unit of measurement is more "popular" between your sensors of the same device class in that area and set that to the sensor group (aggregate), HA should deal automatically with unit conversions. @tbrasser spotted an issue with what I was using to resolve unit of measurements on the beta channel and was the trigger for me to look for a better way of doing it. Thanks again for keeping an eye on the beta channel! ❤️
- Added tests for a lot of stuff, there's still a lot to go but should considerably increase the stability of releases.
- Lastly, I seem to finally have figured it out (after 4 breaking changes) what was causing breaking changes, so we shouldn't have many more of those in the future.
🚀 Features
- Aggregates illuminance threshold hysteresis @jseidl (#401)
- Keep-only presence sensors, for those pesky flappy sensors such as mmwave @jseidl (#398)
- Make schemas tolerant to extra keys @jseidl (#400)
- Modernize and expand tests @jseidl (#380)
🐛 Bug Fixes
- Fixing broken logic on unit of measurement popularity contest @jseidl (#399)
- Fix unit of measurement resolution @jseidl (#393)
- Fixing #375 and changes to the threshold sensor on 2024.7 @jseidl (#378)
🧰 Maintenance
4.0.1
This is a small hotfix to resolve an issue with the threshold sensor due a change on Home Assistant 2024.7 and an issue with adjusting color temperature in the light groups (#377).
Changes
- Update ruff requirement from ~=0.4 to ~=0.5 @dependabot (#376)
- Bump softprops/action-gh-release from 2.0.5 to 2.0.6 @dependabot (#373)
- Update flake8 requirement from ~=7.0 to ~=7.1 @dependabot (#369)
- Bump actions/checkout from 4.1.6 to 4.1.7 @dependabot (#370)
- Update pyupgrade requirement from ~=3.15 to ~=3.16 @dependabot (#365)
- Update packaging requirement from ~=24.0 to ~=24.1 @dependabot (#366)
4.0.0
Hey folks! This is a BIG BOI release! I've went through our feature request list and picked the top ones and implemented almost all of them! I've mostly re-written most of the code to remove complexity and improve stability.
Due to configuration schema changes this release can break your ability to configure existing areas. Removing the entry and adding it back will restore back to normal.
Check them new changes below:
- Floor meta areas: You can now have floors as meta areas just like the Interior/Exterior ones!
- Config UI revamp: Options have now a menu where you can hop in, change one specific setting and hop out without going through the full flow "wizard" like before. Options are now with better descriptions and organized.
- Goodbye dark entity! Dark entity has been renamed to "Area Light Sensor" as most people used a sort of
lightbinary sensor for that. This change now requires this entity to be abinary sensorand also be of device classlight. This helps filtering the select for this entity to onlylightbinary sensors and thesunsensor. - New entity ids, unique ids and names. This update brings generated unique ids and entity ids which used to be derived from the name. This enables Magic Areas to go full internationalized meaning you can now have the entities in your own language! Current translations available are: US English, Latin Spanish and Brazilian Portuguese (translated by a human - me) and German and Dutch (auto-translated). Let me know if you'd like Magic Areas in your own language and it's not on this list. I can provide automatically translated versions and you can help make it better! Names are no longer "Area {XYZ} ({Area Name})" and instead will show up as "{Area Name} {XYZ}" which is compatible with Homekit and most smart home platforms. Unfortunately this means you might have to update your UI or automations if you reference the old entity ids.
- Default timescale for most options is now minutes! The most requested feature is now available, there's a migration function that will automatically convert your settings to minutes (if over a minute, if less, it will set to the defaults).
- Device class selection for aggregate sensors and health sensors! You can now choose which device classes gets sensors created for aggregates and which device classes are considered for health sensors!
- Area State icons are deprecated as an option and are now pulled from the area's icon in Home Assistant!
- Calculated light: You can now have aggregates generate a
binary sensoroflightdevice class according to a set point on the aggregate illuminance for an area. This is a Threshold sensor, if you're familiar with them. Hysteresis is currently not configurable but coming in a future patch (probably). This is especially useful for theExteriormeta area so you can use as anArea light sensorfor your interior areas. - Light groups now only changes lights that are one. If you change a light groups color, brightness, color temp (literally anything), it will forward the changes only to lights that are one! Isn't that dope? If no lights are on then it will act normally and turn on all the lights in the group. This feature was originally brought in by @caphm but only now I had the chance to port it back into the codebase. @caphm my man, you're awesome, thanks a lot for your work!
- Config version and migrations: I've finally figured out how to handle config entry migration so hopefully further possibly breaking changes can be handled automatically.
- Lots of things you won't see or care: The codebase has been massively revamped. Magic Areas grew from a small proof-of-concept code and new features were piled in a not-so-solid base. Most of the code has been completely re-written and (to my feel) is much faster and stable.
Thanks once again to all contributors who were part of the beta and all the ones who contribute to Magic Areas. You folks are the best!
Hope y'all like the new version, let me know your thoughts on our Discord! If anything looks broken, try first deleting and re-creating the Magic Area. If it is still broken, cut me an issue or come chat on Discord!
🐛 Bugfixes
- Update magic.py to use the async_get directly @pinkfish (#330) (this is the one that broke with 2024.6)
- Secondary state tracking now considers ABOVE_HORIZON to support sun.sun @jseidl (#346)
🚀 Features
- Adding floors as meta area types @jseidl (#342)
- Health sensor configurable device classes @jseidl (#356)
- Change default timescale and added migration script @jseidl (#355)
- Light groups now only act on lights that are on, if there are any @jseidl (#354)
- Spanish translation @jseidl (#352)
- Calculated area light @jseidl (#350)
- Configurable aggregate device class @jseidl (#349)
- Climate and Media player groups control switches @jseidl (#344)
- Simplify config flow options and add better descriptions and helper texts @jseidl (#343)
- Use area icon instead of configuration value @jseidl (#341)
All other changes (mostly related to dev environment, CI/CD, testing and version bumps)
- Devcontainer environment and better coding practices @jseidl (#326)
- Minor fixes post code change @jseidl (#353)
- Fix secondary state tracking @jseidl (#348)
- Added back the base light entity for meta light groups @jseidl (#347)
- Adding back default precision to aggregates @jseidl (#345)
- Update fnv-hash-fast requirement from ~=0.4 to ~=0.5 @dependabot (#338)
- Update mypy requirement from ~=1.9 to ~=1.10 @dependabot (#337)
- Update pylint requirement from ~=3.1 to ~=3.2 @dependabot (#336)
- Bump softprops/action-gh-release from 0.1.15 to 2.0.5 @dependabot (#335)
- Update ruff requirement from ~=0.3 to ~=0.4 @dependabot (#339)
- Bump release-drafter/release-drafter from 5 to 6 @dependabot (#334)
- Update black requirement from ~=24.3 to ~=24.4 @dependabot (#340)
- Bump actions/checkout from 4.1.0 to 4.1.6 @dependabot (#333)
- Bump actions/setup-python from 4.7.1 to 5.1.0 @dependabot (#332)
3.1.1
Please read the 3.1.0 release notes if you're not upgrading from 3.1.0.
This is a small hotfix to fix a regression on Climate Groups where groups would be created regardless of the feature being enabled for that area, as long as you had climate devices. This was a regression from the code refactor and is fixed in this release.
Thanks Discord member Ragle for reporting!
Also on this release I'm addressing an issue identified by @tbrasser regarding the new function parameters for the AreaEntry object coming up on the channel branch of Home Assistant. Now as long as we can keep catching those changes on the beta branch, we can future-proof breakings for stable users.