Skip to content

Commit

Permalink
Document home presence inference
Browse files Browse the repository at this point in the history
  • Loading branch information
skdw committed Jan 24, 2025
1 parent 6da172d commit 05d3065
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 24 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ Dashboards are optimized for desktop browser, mobile app and wall panel display.
## Integrations

- [Matter](https://www.home-assistant.io/integrations/matter)
- Zigbee lights (IKEA, Philips) via Dirigera Hub
- [HomeKit Device](https://www.home-assistant.io/integrations/homekit_controller)
- IKEA Dirigera
- IKEA Dirigera Hub
- Zigbee lights (IKEA, Philips)
- Temperature, humidity sensors
- Motion sensors sensors
- Door sensors
- Apple Home ([multi fabric](https://www.home-assistant.io/integrations/matter#multi-fabric-join-to-multiple-controllers) provides an independent Dirigera <-> iOS connection)
- [HomeKit Device](https://www.home-assistant.io/integrations/homekit_controller)
- IKEA Dirigera Hub (not yet Matter enabled)
- Motion sensors
- Water leakage sensors
- [Aqara FP2](https://www.aqara.com/eu/product/presence-sensor-fp2/)
- Human presence sensor
Expand All @@ -32,8 +34,11 @@ Dashboards are optimized for desktop browser, mobile app and wall panel display.
- [Spotify](https://www.home-assistant.io/integrations/spotify/)
- [Android TV](https://www.home-assistant.io/integrations/androidtv/)
- [System Bridge](https://www.home-assistant.io/integrations/system_bridge/) - Windows PC
- [HomeKit Bridge](https://www.home-assistant.io/integrations/homekit/) - HASS entities exposed to Apple Home (complements the Matter service)
- Pioneer home cinema, as Apple media player accessory
- Curtains
- Air quality
- [IPP](https://www.home-assistant.io/integrations/ipp/) - Printer
- [HomeKit Bridge](https://www.home-assistant.io/integrations/homekit/) - HASS entities accessible in HomeKit
- [OpenAI Conversation](https://www.home-assistant.io/integrations/openai_conversation/)
- [Strava](https://github.com/craibo/ha_strava) - exercises tracking
- [Electricity Maps](https://www.home-assistant.io/integrations/co2signal/) - CO2 intensity of home energy
Expand All @@ -56,18 +61,20 @@ The card is illustrated in the image: ![screenshot_card_scenes](image/screenshot
Actions are designed to be triggered manually by the user upon entering or leaving the home as part of their daily routine. The system detects whether the user intends to enter or exit the apartment, consolidating both actions into a single button for convenience.

- **Welcome Home**
- *Condition: no home devices are active (indicating the user is outside home)*
- *Condition: no home switches\* are active (indicating the user is outside home)*
- Sets the lighting scene based on the time of day
- Between 9 PM and 5 AM, activates the **Lights evening** scene
- If the sun's elevation is below 5°, activates the **Lights dinner** scene
- Otherwise, skips the lighting adjustment (daytime)
- Transfers media playback to the home media player
- **Leave Home**
- *Condition: one or more home devices are active (indicating the user is at home)*
- *Condition: one or more home switches\* are active (indicating the user is at home)*
- Turns all the home lights off
- Transfers media playback to the mobile device, allowing the continuation of the track outside the home
- Turns the media player off

\* Enabled switches counter tracks states of the entities listed in [entities/home_presence.yaml](entities/home_presence.yaml). The list includes selected light switches and media players. If at least one entity is active, we infer home presence. Hall lights are intentionally excluded from the list as they are activated both upon entering and leaving the home.

#### Lights scenes

The middle section of the card lists the available home lighting scenes, arranged from the brightest to the dimmest. These scenes can also be activated by **triple-clicking** the corresponding control on the physical six-button switch in the living room, ordered from left to right.
Expand Down
18 changes: 1 addition & 17 deletions automations/automations_enabled_counter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,7 @@
max: 50
trigger:
- platform: state
entity_id:
#- switch.living_room_l1 - skip hall light
- switch.living_room_l2
- switch.living_room_l3
- switch.living_room_l4
- switch.living_room_l5
- switch.living_room_l6
- switch.bathroom_l1
- switch.bathroom_l2
- switch.balcony_l1
- switch.balcony_l2
- switch.wardrobe
- switch.bedroom_ceiling
- switch.bedroom_reading_left
- switch.bedroom_reading_right
- media_player.pioneer_onkyo
- media_player.pioneer_onkyo_zone_2
entity_id: !include ../entities/home_presence.yaml
condition: "{{ trigger.from_state.state != trigger.to_state.state and trigger.from_state.state in ['off', 'on'] and trigger.to_state.state in ['off', 'on'] }}"
action:
- action: "{{ 'counter.decrement' if trigger.to_state.state == 'off' else 'counter.increment' }}"
Expand Down
16 changes: 16 additions & 0 deletions entities/home_presence.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#- switch.living_room_l1 - skip hall light
- switch.living_room_l2
- switch.living_room_l3
- switch.living_room_l4
- switch.living_room_l5
- switch.living_room_l6
- switch.bathroom_l1
- switch.bathroom_l2
- switch.balcony_l1
- switch.balcony_l2
- switch.wardrobe
- switch.bedroom_ceiling
- switch.bedroom_reading_left
- switch.bedroom_reading_right
- media_player.pioneer_onkyo
- media_player.pioneer_onkyo_zone_2

0 comments on commit 05d3065

Please sign in to comment.