summaryrefslogtreecommitdiff
path: root/hostnix/elmo
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2025-09-02 11:12:31 -0400
committerJoe Mou <dev@mou.fo>2026-02-04 14:27:00 -0500
commitca5c7c86e23f0588339ff08753a448679ee6630b (patch)
tree5782742d9964f115e08b6783360cec5dd93ed093 /hostnix/elmo
parentc9e5f16d03656e58ab5ab39b10dd3f6db59eb877 (diff)
HA: Check fridge door
Some other minor adjustments to entity naming, fan, and grow light.
Diffstat (limited to 'hostnix/elmo')
-rw-r--r--hostnix/elmo/home-assistant.nix48
1 files changed, 41 insertions, 7 deletions
diff --git a/hostnix/elmo/home-assistant.nix b/hostnix/elmo/home-assistant.nix
index 4a2ff80..6ca11e6 100644
--- a/hostnix/elmo/home-assistant.nix
+++ b/hostnix/elmo/home-assistant.nix
@@ -52,6 +52,10 @@
target.entity_id = entity;
};
};
+
+ entity = {
+ sad_lamp = "switch.dot";
+ };
};
in
@@ -450,7 +454,7 @@
};
action = [
(ha.action.off "light.panel_light")
- (ha.action.off "switch.dot")
+ (ha.action.off ha.entity.sad_lamp)
(ha.action.off "climate.bedroom_cool")
(ha.action.off "climate.air_conditioner_1")
];
@@ -479,7 +483,7 @@
];
action = [
(ha.action.on "light.panel_light")
- (ha.action.on "switch.dot")
+ (ha.action.on ha.entity.sad_lamp)
];
}
@@ -571,14 +575,21 @@
alias = "Grow light morning";
# TODO make configurable (snooze)
trigger = [ (ha.trigger.at "09:00") ];
+ condition = [
+ {
+ condition = "zone";
+ entity_id = "person.joe";
+ zone = "zone.home";
+ }
+ ];
action = [
(ha.action.on "light.grow_light")
(ha.action.on "switch.wakko")
- {
- service = "fan.set_percentage";
- target.entity_id = "fan.core_200s";
- data.percentage = 100;
- }
+ # {
+ # service = "fan.set_percentage";
+ # target.entity_id = "fan.core_200s";
+ # data.percentage = 100;
+ # }
];
}
{
@@ -598,6 +609,29 @@
(button "binary_sensor.bedroom_button_2"
(ha.action.toggle "switch.wakko"))
+ {
+ alias = "Fridge door ajar";
+ triggers = [
+ {
+ trigger = "state";
+ entity_id = [ "binary_sensor.fridge_door_sensor" ];
+ to = [ "on" ];
+ for.minutes = 1;
+ }
+ ];
+ actions = [
+ {
+ action = "notify.notify";
+ data.message = "Check fridge door";
+ }
+ (ha.action.toggle "light.panel_light")
+ (ha.action.toggle ha.entity.sad_lamp)
+ { delay.milliseconds = 500; }
+ (ha.action.toggle "light.panel_light")
+ (ha.action.toggle ha.entity.sad_lamp)
+ ];
+ }
+
# The panel light can become unresponsive and need to be reboot.
{
alias = "Panel light reinitialize";