Skip to content

Releases: jseidl/hass-magic_areas

4.2.0

08 Jan 08:59
Compare
Choose a tag to compare

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!

⚠️ The entity_id (and unique_id) for the "All Lights" entity for all Meta-Areas has changed as it was missing the translation_key that 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

4.1.0

05 Sep 06:43
Compare
Choose a tag to compare

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

  • Docs upgrade on README.md @jseidl (#404)
  • Fixing threshold sensor test to pass on GitHub and minor version bumps + consolidation of latest releases @jseidl (#397)

4.0.1

04 Jul 10:43
Compare
Choose a tag to compare

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

4.0.0

06 Jun 20:49
Compare
Choose a tag to compare

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 light binary sensor for that. This change now requires this entity to be a binary sensor and also be of device class light. This helps filtering the select for this entity to only light binary sensors and the sun sensor.
  • 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 sensor of light device 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 the Exterior meta area so you can use as an Area light sensor for 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)

3.1.1

29 Feb 23:42
f535dcd
Compare
Choose a tag to compare

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.

🐛 Bug Fixes

  • Adding back feature enable check to climate groups @jseidl (#321)

Other Changes

  • Adding Area default values for parameters that will be required in future versions @jseidl (#322)
  • updating info.md for hacs @jseidl (#320)

3.1.0

29 Feb 06:15
Compare
Choose a tag to compare

⚠️ You need to remove magic_areas: from your configuration.yaml before restarting when you upgrade! You don't need to reconfigure anything as configuration will be kept!

The 3.1.0 version brings a LOT of changes that users will not even notice and a couple really nice quality-of-life improvements. First, I got rid of the automatic creation of Magic Area integration entries on load and opted to follow the full GUI experience. Now you can add (and remove!) Magic Areas for any area you want! Secondly, Magic Area entries are now a device in Home Assistant allowing you to see all it's switches and sensors in one place.

We're also fixing the bug introduced by Home Assistant 2024.2 which introduced area icons. I'll be shortly deprecating the icon attribute on Magic Areas in favor of using the area's icon.

The whole codebase was revised and a majority of it was refactored to make it more repeatable, stable and fast. Over 1.5k lines of code were removed and another 1.5k were added.

I'd like to give a huge thanks our Discord members who helped beta-test this release. You folks are the best! ❤️

🚀 Features

  • Area Devices + Major code refactor @jseidl (#300)
  • Config flow setup @jseidl (#299)
  • Adding last_active_sensors to better help debug flipping sensors @jseidl (#310)
  • Adding support for binary sensors to act in ALL mode @jseidl (#303)
  • Light groups now release control if manually controlled @jseidl (#284)

🐛 Bug Fixes

  • Fix loading issues under 2024.2.0 @grinco (#309)
  • Update climate.py fix for 2024.1 @tbrasser (#298)
  • Add async to load_entities method in add_entities_when_ready @Julien-Decoen (#315)
  • Checking if area was just occupied when bright before turning off @jseidl (#302)
  • Fixing condition to skip binary sensors w/o device class @jseidl (#301)
  • Fixing dict copy that was overwriting entity_id @jseidl (#283)

🧰 Maintenance

  • Updating minimum HA version on HACS.json by @jseidl in #277
  • Fixed CI pipeline now that ha-blueprint is deprecated @jseidl (#307)
  • Updating some metadata and readme for latest updates @jseidl (#311)
  • Updating minimum HA version on HACS.json @jseidl (#277)

✨ New Contributors

Full Changelog: 3.0.2...3.1.0

3.0.2

09 Jan 03:58
2501bd9
Compare
Choose a tag to compare

This is a mostly-bugfix release to address the failure to load in the latest HA update, thanks for our hero @cerebrate!

Also shipping on this release is a few fixes for things being deprecated (thanks @frenck!) and some minor features including a German localization by @klatka and a missed "feature" of having the sun.sun available as a dark state.

🚀 Features

  • Add german localization @klatka (#275)
  • Adding SUN_DOMAIN (sun.sun) to the config flow entity filter @jseidl (#274)

🐛 Bug Fixes

  • Update init.py to fix #265 which caused MA failing to load on recent HA update @cerebrate (#269)
  • Fixing version number on release drafter @jseidl (#276)
  • Replacing the deprecated DEVICE_CLASS_ variables @jseidl (#273)

🧰 Maintenance

  • Fixing version number on release drafter @jseidl (#276)

All Changes

3.0.1

21 Jul 03:18
e170693
Compare
Choose a tag to compare

⚠️ WARNING! If you're coming from 2.x releases, read CAREFULLY the release notes for 3.0.0 as there are BREAKING CHANGES

This release is a minor bugfix (major bug, minor fix) for the configuration UI who lost defaults, optional fields and selectors stopped working after a Home Assistant update. Turns out it was poorly implemented by me and now I hope that I got it right this time.

This has been tested in my dev env, in my production deployment and also by community members, if you still experience issues please cut me a bug report!

Changes

🐛 Bug Fixes

  • fixing defaults and optionals on selectors for config flow @jseidl (#237)

3.0.0

09 Jul 05:31
d167492
Compare
Choose a tag to compare

Magic Areas 3.0! A major revamp!

After a year from last release and months of hard beta testing (a HUGE thank you for the community that helped test and reported bugs ❤️), release 3.0 is finally out!

This new major version is BREAKING and you WILL have to reconfigure your areas even if you were in the 3.0 beta release! If you have a large setup, take some time, grab some coffee play some smooth jazz (or metal, depending on your mood) while upgrading.

There were significant changes to support UI configuration and some normalization of unique_ids which means you will have to delete all your Magic Areas and re-create them after upgrading. There was no way to avoid this and I apologize for the hassle!

I've tried to add extensive documentation to the Wiki. If you are having problems, hop onto our Discord server for help!

3.0 New features and notable changes

  • Features no longer listen to entities. New IPC / event-based system lets features just listen to events instead and let the single binary sensor track all the relevant entities. This was the bulk of the 3.0 release which DRASTICALLY improved both speed and overall reliability. Huge shout out to @caphm who started all this.
  • Secondary states were introduced. Make sure to head out to the wiki to read about the concepts.
  • Light Group feature now creates a switch entity (switch.area_light_control_$area-slug) that allows you to switch light control on/off on the fly, no longer having to work with Presence Hold to prevent light actions from happening.
  • All binary_sensor device classes are available for presence detection on the area configuration
  • Config flow selectors! @jseidl (#212) The UI is MUCH nicer and less convoluted which makes configuring your Magic Areas way easier!
  • Presence Hold Timeout (#58 ) @sti0 - You can now set a timeout for presence hold.
  • on_states is no longer a free-text field because the workaround we had to do to support that is no longer working with config_flow. It's now a list of predefined values that the user can chose from. Let me know if you need other states that are not on the list.
  • Removed behavior where if you didn't had any group configured for the occupied state, all lights would turn on. You can still replicate that by adding all light groups to the occupied state.

All feature requests and questions were moved to GitHub Discussions. The issues area will be used for bug reports only.

Full list of changes

🚀 Features

  • Event-based IPC @jseidl (#126) This PR includes fixes from @caphm's PRs which gave us multi-step config options, more async/event driven behavior and fixes for many open issues.
  • Add binary sensor vibration / connectivity device class for presence detection (#99) @sti0
  • Light Group "All Lights" turn_on behavior removal @jseidl (#233)

🐛 Bug Fixes (from 3.0 beta)

🧰 Maintenance

3.0.0-beta2

07 Apr 07:05
fd7c49b
Compare
Choose a tag to compare
3.0.0-beta2 Pre-release
Pre-release

This is a minor release fixing the breakings brought by Home Assistant's 2022.4 update.

What's Changed

  • Hotfix/translations title breaking CI by @jseidl in #204
  • ALL_BINARY_SENSOR_CLASSES set it and forget it! by @jseidl in #203
  • Fix for groups breaking change on home assistant 2022.4 by @jseidl in #202