stuff
This commit is contained in:
parent
1ac7e0c6e1
commit
6200ef7e76
5 changed files with 115 additions and 123 deletions
|
|
@ -1,30 +1,32 @@
|
||||||
{ ... }:
|
{ lib, config, ... }:
|
||||||
{
|
{
|
||||||
services.home-assistant.config = {
|
config = lib.mkIf config.server.home-assistant.enable {
|
||||||
"automation" = [
|
services.home-assistant.config = {
|
||||||
{
|
"automation" = [
|
||||||
alias = "Towel Warmer Timer";
|
{
|
||||||
trigger = {
|
alias = "Towel Warmer Timer";
|
||||||
type = "turned_on";
|
trigger = {
|
||||||
device_id = "bf77f1611d1d9959e967b4e35ba5234c";
|
type = "turned_on";
|
||||||
entity_id = "b674ce8cc70a4d0c1bfba7c6946ab3e4";
|
|
||||||
domain = "switch";
|
|
||||||
trigger = "device";
|
|
||||||
for = {
|
|
||||||
hours = 0;
|
|
||||||
minutes = 60;
|
|
||||||
seconds = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
action = [
|
|
||||||
{
|
|
||||||
type = "turn_off";
|
|
||||||
device_id = "bf77f1611d1d9959e967b4e35ba5234c";
|
device_id = "bf77f1611d1d9959e967b4e35ba5234c";
|
||||||
entity_id = "b674ce8cc70a4d0c1bfba7c6946ab3e4";
|
entity_id = "b674ce8cc70a4d0c1bfba7c6946ab3e4";
|
||||||
domain = "switch";
|
domain = "switch";
|
||||||
}
|
trigger = "device";
|
||||||
];
|
for = {
|
||||||
}
|
hours = 0;
|
||||||
];
|
minutes = 60;
|
||||||
|
seconds = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
action = [
|
||||||
|
{
|
||||||
|
type = "turn_off";
|
||||||
|
device_id = "bf77f1611d1d9959e967b4e35ba5234c";
|
||||||
|
entity_id = "b674ce8cc70a4d0c1bfba7c6946ab3e4";
|
||||||
|
domain = "switch";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
{...}: {
|
{ lib, config, ... }:
|
||||||
services.home-assistant.config.automation = [
|
{
|
||||||
{
|
config = lib.mkIf config.server.home-assistant.enable {
|
||||||
description = "Pause Heating when Window opens";
|
services.home-assistant.config.automation = [
|
||||||
alias = "Heating Pause";
|
{
|
||||||
use_blueprint = {
|
description = "Pause Heating when Window opens";
|
||||||
path = "raffy-ops/hvac_pause.yaml";
|
alias = "Heating Pause";
|
||||||
input = {
|
use_blueprint = {
|
||||||
climate_device = "climate.shellyblutrv_286847ef7fc0";
|
path = "raffy-ops/hvac_pause.yaml";
|
||||||
doors_windows = "binary_sensor.shelly_blu_door_window_3a5a_window";
|
input = {
|
||||||
action_first = true;
|
climate_device = "climate.shellyblutrv_286847ef7fc0";
|
||||||
|
doors_windows = "binary_sensor.shelly_blu_door_window_3a5a_window";
|
||||||
|
action_first = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
];
|
||||||
];
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,55 +1,58 @@
|
||||||
{...}: {
|
{ lib, config, ... }:
|
||||||
services.home-assistant.config.automation = [
|
{
|
||||||
{
|
config = lib.mkIf config.server.home-assistant.enable {
|
||||||
alias = "Wake Up Light";
|
services.home-assistant.config.automation = [
|
||||||
description = "Turn on the light on alarm ringing";
|
{
|
||||||
trigger = {
|
alias = "Wake Up Light";
|
||||||
|
description = "Turn on the light on alarm ringing";
|
||||||
|
trigger = {
|
||||||
platform = "time";
|
platform = "time";
|
||||||
at = "sensor.lilith_phone_next_alarm";
|
at = "sensor.lilith_phone_next_alarm";
|
||||||
};
|
|
||||||
condition = [];
|
|
||||||
action = [
|
|
||||||
{
|
|
||||||
action = "light.turn_on";
|
|
||||||
metadata = {};
|
|
||||||
data = {
|
|
||||||
transition = 3;
|
|
||||||
kelvin = 3000;
|
|
||||||
brightness_pct = 100;
|
|
||||||
};
|
|
||||||
target = {
|
|
||||||
device_id = "7d40ebcac890a2743d7dc2a6dc4ca797";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
mode = "single";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
alias = "Automatic Light Off";
|
|
||||||
description = "Turn off the light after 15 minutes once Liv leaves the house";
|
|
||||||
trigger = {
|
|
||||||
platform = "state";
|
|
||||||
entity_id = "person.liv_benstem";
|
|
||||||
from = "home";
|
|
||||||
to = "not_home";
|
|
||||||
for = {
|
|
||||||
hours = 0;
|
|
||||||
minutes = 10;
|
|
||||||
seconds = 0;
|
|
||||||
};
|
};
|
||||||
};
|
condition = [ ];
|
||||||
condition = [];
|
action = [
|
||||||
action = [
|
{
|
||||||
{
|
action = "light.turn_on";
|
||||||
action = "light.turn_off";
|
metadata = { };
|
||||||
metadata = {};
|
data = {
|
||||||
data = {};
|
transition = 3;
|
||||||
target = {
|
kelvin = 3000;
|
||||||
area_id = "bedroom";
|
brightness_pct = 100;
|
||||||
|
};
|
||||||
|
target = {
|
||||||
|
device_id = "7d40ebcac890a2743d7dc2a6dc4ca797";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
mode = "single";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
alias = "Automatic Light Off";
|
||||||
|
description = "Turn off the light after 15 minutes once Liv leaves the house";
|
||||||
|
trigger = {
|
||||||
|
platform = "state";
|
||||||
|
entity_id = "person.liv_benstem";
|
||||||
|
from = "home";
|
||||||
|
to = "not_home";
|
||||||
|
for = {
|
||||||
|
hours = 0;
|
||||||
|
minutes = 10;
|
||||||
|
seconds = 0;
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
];
|
condition = [ ];
|
||||||
mode = "single";
|
action = [
|
||||||
}
|
{
|
||||||
];
|
action = "light.turn_off";
|
||||||
|
metadata = { };
|
||||||
|
data = { };
|
||||||
|
target = {
|
||||||
|
area_id = "bedroom";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
mode = "single";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,23 @@
|
||||||
{ sops, config, ...}: {
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.server.home-assistant.enable {
|
||||||
|
|
||||||
sops.secrets."home-assistant/mosquitto/hass" = {};
|
sops.secrets."home-assistant/mosquitto/hass" = { };
|
||||||
|
|
||||||
services.mosquitto = {
|
services.mosquitto = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listeners = [
|
listeners = [
|
||||||
{
|
{
|
||||||
address = "192.168.178.111";
|
address = "192.168.178.111";
|
||||||
port = 1883;
|
port = 1883;
|
||||||
users.hass = {
|
users.hass = {
|
||||||
acl = [ "readwrite #" ];
|
acl = [ "readwrite #" ];
|
||||||
hashedPasswordFile = config.sops.secrets."home-assistant/mosquitto/hass".path;
|
hashedPasswordFile = config.sops.secrets."home-assistant/mosquitto/hass".path;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 1883 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 1883 ];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
{...}: {
|
|
||||||
services.wyoming = {
|
|
||||||
piper.servers = {
|
|
||||||
alba = {
|
|
||||||
enable=true;
|
|
||||||
uri="tcp://localhost:12001";
|
|
||||||
voice="en_GB-alba-medium";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
faster-whisper.servers = {
|
|
||||||
tiny = {
|
|
||||||
enable=true;
|
|
||||||
uri="tcp://localhost:12002";
|
|
||||||
model="tiny-int8";
|
|
||||||
language="en";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue