agittins / agittins/bermuda

Aggregate Sensors for Counting Devices per Area + Area Occupancy Binary Sensors

未关闭
#673 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
2k
派生
70
PR 合并指标
30 天内没有已合并 PR

描述

**Is your feature request related to a problem? Please describe.**
Currently, Bermuda provides per‑device sensors with attributes such as `area` and `distance`. While this is very useful for tracking individual devices, there is no built‑in way to know *how many devices are currently present in a given area* or simply *whether an area is occupied at all*. This makes it harder to build straightforward automations that depend on room‑level occupancy without creating custom templates.

**Describe the solution you'd like**
I would like Bermuda to optionally create:
1. **Aggregate Count Sensors** – e.g. `sensor.devices_in_living_room` → `3`, `sensor.devices_in_kitchen` → `1`.
2. **Binary Area Occupancy Sensors** – e.g. `binary_sensor.living_room_occupancy` with `device_class: occupancy`, reporting `on` if at least one device is present in the area, `off` otherwise.

These sensors would update dynamically whenever a device’s `area` attribute changes. Ideally, this could be enabled via configuration flags such as `create_area_counters: true` and `create_area_occupancy: true`.

**Describe alternatives you've considered**
- Creating custom template sensors in Home Assistant that count devices per area.
- Using groups and Jinja templates to approximate occupancy.
- While these work, they require manual setup and maintenance, and they duplicate logic that Bermuda already has internally.

**Additional context**
- This feature would simplify automations for lights, HVAC, media, and security.
- It would align with Home Assistant’s native entity model (`device_class: occupancy`).

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。