home assistant and matrix changes
This commit is contained in:
@@ -40,6 +40,7 @@ in
|
||||
localAddress = "10.42.113.20/24";
|
||||
extraFlags = [
|
||||
"--capability=CAP_NET_ADMIN"
|
||||
"--capability=CAP_MKNOD"
|
||||
];
|
||||
# allowedDevices = [
|
||||
# {
|
||||
@@ -50,12 +51,16 @@ in
|
||||
# modifier = "rwm";
|
||||
# node = "char-ttyUSB";
|
||||
# }
|
||||
# {
|
||||
# modifier = "rwm";
|
||||
# node = "/dev/ttyUSB0";
|
||||
# }
|
||||
# ];
|
||||
bindMounts = {
|
||||
# "/dev/ttyUSB0" = {
|
||||
# hostPath = "/dev/ttyUSB0";
|
||||
# isReadOnly = false;
|
||||
# };
|
||||
"/dev/ttyUSB0" = {
|
||||
hostPath = "/dev/ttyUSB0";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/etc/localtime" = {
|
||||
hostPath = "/etc/localtime";
|
||||
};
|
||||
@@ -113,6 +118,11 @@ in
|
||||
pkgs.mariadb
|
||||
];
|
||||
|
||||
# Allow access to the USB device
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666"
|
||||
'';
|
||||
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
sslCertificate = "/var/lib/acme/hass/fullchain.pem";
|
||||
@@ -247,7 +257,7 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
users.users.hass.extraGroups = [ "dialout" ];
|
||||
users.users.hass.extraGroups = [ "dialout" "tty" ];
|
||||
system.stateVersion = "23.05";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"light.livingroom_lights"
|
||||
"light.hallway_lights"
|
||||
"light.bathroom_lights"
|
||||
"light.toilett_lights"
|
||||
"light.toilet_lights"
|
||||
"light.storage_lights"
|
||||
];
|
||||
to = "on";
|
||||
@@ -67,7 +67,7 @@
|
||||
{
|
||||
choose = [
|
||||
{
|
||||
conditions = [ "{{ state_attr('sun.sun', 'elevation') < 5 and trigger.entity_id == 'light.toilett_lights' }}" ];
|
||||
conditions = [ "{{ state_attr('sun.sun', 'elevation') < 5 and trigger.entity_id == 'light.toilet_lights' }}" ];
|
||||
sequence = [
|
||||
{
|
||||
delay = 10;
|
||||
@@ -78,7 +78,7 @@
|
||||
entity_id = "{{ trigger.entity_id }}";
|
||||
};
|
||||
data = {
|
||||
brightness_pct = 10;
|
||||
brightness_pct = 20;
|
||||
color_temp = 450;
|
||||
};
|
||||
}
|
||||
@@ -398,6 +398,20 @@
|
||||
"light.bedroom_bulb_4"
|
||||
];
|
||||
}
|
||||
{
|
||||
platform = "switch";
|
||||
name = "Toilet Switch";
|
||||
entity_id = "switch.toilet";
|
||||
}
|
||||
{
|
||||
platform = "group";
|
||||
name = "Toilet Lights";
|
||||
all = true;
|
||||
entities = [
|
||||
"light.toilet"
|
||||
"light.toilet_bulb"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user