{"id":13585967,"url":"https://github.com/jseidl/hass-magic_areas","last_synced_at":"2025-04-07T14:32:55.626Z","repository":{"id":38214863,"uuid":"299123388","full_name":"jseidl/hass-magic_areas","owner":"jseidl","description":"Areas with batteries included for Home Assistant","archived":false,"fork":false,"pushed_at":"2024-02-29T23:42:00.000Z","size":294,"stargazers_count":164,"open_issues_count":1,"forks_count":23,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-03-01T07:27:39.887Z","etag":null,"topics":["automation","homeassistant","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jseidl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-09-27T21:34:35.000Z","updated_at":"2024-04-15T09:56:46.488Z","dependencies_parsed_at":"2024-02-10T09:27:43.045Z","dependency_job_id":"dd499a94-4b65-483e-9ed5-dd92dd278b31","html_url":"https://github.com/jseidl/hass-magic_areas","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jseidl%2Fhass-magic_areas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jseidl%2Fhass-magic_areas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jseidl%2Fhass-magic_areas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jseidl%2Fhass-magic_areas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jseidl","download_url":"https://codeload.github.com/jseidl/hass-magic_areas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247670238,"owners_count":20976532,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","homeassistant","python"],"created_at":"2024-08-01T15:05:15.052Z","updated_at":"2025-04-07T14:32:55.613Z","avatar_url":"https://github.com/jseidl.png","language":"Python","funding_links":["https://www.buymeacoffee.com/janseidl"],"categories":["Python"],"sub_categories":[],"readme":"![Build Status][ci-status] [![GitHub Release][releases-shield]][releases] [![License][license-shield]](LICENSE) [![GitHub Last Commit][last-commit-shield]][commits]\n![Project Maintenance][maintenance-shield] [![BuyMeCoffee][buymecoffeebadge]][buymecoffee]\n\n[![HACS][hacs-shield]][hacs] ![integration-usage-shield] [![Discord][discord-shield]][discord]\n\n![ma-logo]\n\n# Your areas so smart it's almost magic! 🪄\n\nMagic Areas is a custom component for [Home Assistant](https://www.home-assistant.io/) that magically makes sense of the devices and entities in your areas so you don't have to! Its main purpose is tracking presence in your Home Assistant's areas but in reality it's much, much more than that.\n\n\u003cimg align=\"right\" width='450' src=\"assets/images/readme_combined_presence_sources.gif\" style=\"margin-left: 30px; margin-top: 8px;\"\u003e\n\n### Multiple sources of presence\n\nMotion-activated lights are so 2000s. Magic Areas tracks multiple sources of presence in order to gauge an area's `occupancy` state, which you can use in automations but as you'll see, you might not even have to.\n\nMotion sensors, doors, media devices, device presence (`device_trackers`) are supported and you can use [Threshold](https://www.home-assistant.io/integrations/threshold/) and [Template](https://www.home-assistant.io/integrations/template/) binary sensors to track presence from power consumption and other entities' states!\n\nIn the demo on the left, the area gets cleared instantly for illustration purposes but in reality you can configure the timeout you want for an area to not receive any presence event before it gets marked as clear/not occupied.\n\nThe \"Presence Hold\" feature gives you a `switch` that is considered a source of presence and will let users hold an area `occupied` while the switch is `on`.\n\n\u003cimg align=\"right\" src=\"assets/images/upstairs-controls.png\" style=\"margin-left: 30px; margin-top: 25px;\"\u003e\n\n### Meta-areas\n\nMagic Areas allows you to specify if an area is `interior` or `exterior` which allows it to create Meta-areas which groups all entities from said areas into their respective meta-areas.\n\nSince the addition of `floors` to Home Assistant, Magic Areas now supports `floor` meta-areas in the same way as it does for the `exterior` / `interior` ones!\n\nSome features (such as aggregation and groups) are available for meta-areas which allows you to control all your lights, media player devices, covers and climate devices of exterior areas, interior areas or whole floors in a single place.\n\nMeta-areas simplify things by allowing you to use their aggregate sensors such as \"Interior Motion\" and \"Exterior Door\" in your alarm setups, \"Exterior Light\" as your area light sensors and much more!\n\n\u003cimg align=\"right\" width='450' src=\"assets/images/temperature-aggregate.png\" style=\"margin-left: 30px; margin-top: 8px\"\u003e\n\n### Aggregate sensors\n\nGroup and automatically convert different unit sensors of the same `device class` together!\n\nAggregates are plain Home Assistant [Groups](https://www.home-assistant.io/integrations/group/) and behave the same. Sensors of the same `device class` but with different `units of measurement` will be normalized and converted according to your unit system.\n\nEven if you only have one sensor of each `device class`, aggregates allows you to reference a single entity in your automations while considering all others of the same `device class` but also allowing you to add new devices/entities to an area and having them automatically be considered in your automations that reference their aggregates.\n\n### Light Groups\n\nProbably the most utilized feature of Magic Areas, allows you to automatically control your area's lights according an area's state. Would you like to have your overhead lights turned on when dark, but only your accent lights when watching TV unless you're sleeping then only a small light strip under your bed? Magic Areas has got you covered!\n\nOur light groups are also smarter, meaning when you, for example, change brightness or color in a Magic Light Group, unlike regular Light Groups, it won't turn on other lights that are members of the same group that are off, effecively allowing changes in a light group to affect only lights that are currently on!\n\nWhen an area is clear or it gets bright, Magic Areas will take care of turning the lights off for you!\n\n### Climate Groups\n\nIt (usually) doesn't make sense to have your fans running when you're not there, right? If you pair your fans with [Generic Thermostats](https://www.home-assistant.io/integrations/generic_thermostat), you can have Magic Areas turn your fans on (and off!) for you! A clever twist is that areas have an `extended` state and you can set your climate group to only turn on after you've been there for a while, to avoid them coming on when you're just passing by.\n\n### Area-aware media player\n\nSending Text-to-speech notifications to media players is awesome, but sending notifications where no-one will hear isn't very smart and not magical at all. Area-aware media player is a media player group that will only forward `play` events to configured notification devices (i.e. media players) in areas that are currently `occupied`.\n\nBut wait, you won't wake up your kids! Magic areas allows you to specify states in which an area must be in order to receive notifications. Since Magic Areas supports a `sleep` state, if you leave that state out, areas that are sleeping won't be notified!\n\n_And that's just the coolest ones, for all the features Magic Areas provides, check out the [wiki](https://github.com/jseidl/hass-magic_areas/wiki/Features)._\n\n## Demo / How can Magic Areas help me?\n\nCheck out the wiki cookbook [Magic Areas in every room](https://github.com/jseidl/hass-magic_areas/wiki/Magic-Areas-in-every-room) to see how you can apply Magic Areas to make every room in your house, magic!\n\n## Installation\n\n_Magic Areas_ is available on [HACS](https://hacs.xyz/)! For installation instructions check the installation [wiki](https://github.com/jseidl/hass-magic_areas/wiki/Installation).\n\n## Configuration\nConfiguration options for `Magic Areas` are on a per-area basis.\n\n\u003e ⚠️ Before you start: Please make sure you understand all the **Concepts** on the [wiki](https://github.com/jseidl/hass-magic_areas/wiki).\n\n\u003e 💡 Light Groups won't control any lights unless the `Light Control` switch for that area is turned `on`!\n\nGo to **Configuration** \u003e **Integrations**. You will see the *Magic Areas* integration and configure each area (and [Meta-Areas](https://github.com/jseidl/hass-magic_areas/wiki/Meta-Areas)!).\n\nSee all configuration options in the [wiki](https://github.com/jseidl/hass-magic_areas/wiki/Configuration).\n\n\n## Magic Areas in your language!\n\nMagic Areas has full translation support, meaning even your entities will be translated and is available in the following languages:\n\n\u003ca href=\"https://hosted.weblate.org/engage/magic-areas/\"\u003e\n\u003cimg src=\"https://hosted.weblate.org/widget/magic-areas/multi-auto.svg\" alt=\"Translation status\" /\u003e\n\u003c/a\u003e\n\nHelp to translate Magic Areas into your language from your web browser! We use [Hosted Weblate](https://hosted.weblate.org/engage/magic-areas/) so you don't need to fool around with pull requests nor JSON files!\n\n## Problems/bugs, questions, feature requests?\n\n### Questions?\n\nCome talk to me on the `#support` channel at my [Discord server](https://discord.gg/8vxJpJ2vP4) or pop a question on our [Q\u0026A Discussions page](https://github.com/jseidl/hass-magic_areas/discussions/categories/q-a)!\n\n### Issues?\n\nPlease enable debug logging by putting this in `configuration.yaml`:\n\n```yaml\nlogger:\n    default: warning\n    logs:\n        custom_components.magic_areas: debug\n```\n\nAs soon as the issue occurs capture the contents of the log (`/config/home-assistant.log`) and open up a [ticket](https://github.com/jseidl/hass-magic_areas/issues) or join the `#support` channel on my [Discord server](https://discord.gg/8vxJpJ2vP4)!\n\n### Feature requests\n\nPlease do not open issues for feature requests. Use the [Feature Request discussions area](https://github.com/jseidl/hass-magic_areas/discussions/categories/ideas-feature-requests) to contribute with your ideas!\n\n## Contributions are welcome!\n\nIf you would like to contribute to Magic Areas please read the [Contribution guidelines](CONTRIBUTING.md).\n\n\n***\n\n[magic_areas]: https://github.com/jseidl/hass-magic_areas\n[buymecoffee]: https://www.buymeacoffee.com/janseidl\n[buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge\n[commits-shield]: https://img.shields.io/github/commit-activity/y/jseidl/hass-magic_areas.svg?style=for-the-badge\n[commits]: https://github.com/jseidl/hass-magic_areas/commits/main\n[discord]: https://discord.gg/tvaS4BG5\n[hacs]: https://github.com/hacs/integration\n[discord-shield]: https://img.shields.io/discord/928386239789400065?style=for-the-badge\u0026label=Discord\n[license-shield]: https://img.shields.io/github/license/jseidl/hass-magic_areas.svg?style=for-the-badge\n[maintenance-shield]: https://img.shields.io/badge/maintainer-Jan%20Seidl%20%40jseidl-blue.svg?style=for-the-badge\n[releases-shield]: https://img.shields.io/github/release/jseidl/hass-magic_areas.svg?style=for-the-badge\n[releases]: https://github.com/jseidl/hass-magic_areas/releases\n[ci-status]: https://img.shields.io/github/actions/workflow/status/jseidl/hass-magic_areas/validation.yaml?style=for-the-badge\n[last-commit-shield]: https://img.shields.io/github/last-commit/jseidl/hass-magic_areas?style=for-the-badge\n[ma-logo]: https://raw.githubusercontent.com/home-assistant/brands/master/custom_integrations/magic_areas/logo.png\n[contributors-badge]: https://flat.badgen.net/github/contributors/jseidl/hass-magic_areas\n[integration-usage-shield]: https://img.shields.io/badge/dynamic/json?color=41BDF5\u0026logo=home-assistant\u0026label=integration%20usage\u0026suffix=%20installs\u0026cacheSeconds=15600\u0026url=https://analytics.home-assistant.io/custom_integrations.json\u0026query=$.magic_areas.total\u0026style=for-the-badge\n[hacs-shield]: https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjseidl%2Fhass-magic_areas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjseidl%2Fhass-magic_areas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjseidl%2Fhass-magic_areas/lists"}