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)