mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
Merge pull request #44 from arcnmx/hass-beacons
feat: mqtt_room presence beacons
This commit is contained in:
commit
fa4bfb27e8
1 changed files with 17 additions and 0 deletions
|
|
@ -141,6 +141,23 @@
|
|||
# https://nixos.wiki/wiki/Home_Assistant#Combine_declarative_and_UI_defined_scenes
|
||||
"scene manual" = [];
|
||||
"scene ui" = "!include scenes.yaml";
|
||||
sensor = let
|
||||
mkESPresenceBeacon = { device_id, ... }@args: {
|
||||
platform = "mqtt_room";
|
||||
state_topic = "espresense/devices/${device_id}";
|
||||
} // args;
|
||||
in [
|
||||
(mkESPresenceBeacon {
|
||||
device_id = "irk:${secrets.arc-iphone-se-irk}";
|
||||
name = "iPhone SE";
|
||||
timeout = 2;
|
||||
away_timeout = 120;
|
||||
})
|
||||
(mkESPresenceBeacon {
|
||||
device_id = "name:galaxy-watch-active";
|
||||
name = "Galaxy Watch Active";
|
||||
})
|
||||
];
|
||||
};
|
||||
extraPackages = python3Packages: with python3Packages; [
|
||||
psycopg2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue