light-control: setup new flat

This commit is contained in:
Ingolf Wagner 2020-10-21 22:57:48 +02:00
parent e8e57b750a
commit a7c02a0079
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
4 changed files with 74 additions and 124 deletions

View file

@ -159,14 +159,14 @@ in {
{ {
platform = "state"; platform = "state";
# todo : groups are not working right now # todo : groups are not working right now
entity_id = "binary_sensor.door_sensor_2"; entity_id = "binary_sensor.door_sensor_4";
from = "off"; from = "off";
to = "on"; to = "on";
} }
{ {
platform = "state"; platform = "state";
# todo : groups are not working right now # todo : groups are not working right now
entity_id = "binary_sensor.door_sensor_2"; entity_id = "binary_sensor.door_sensor_4";
from = "on"; from = "on";
to = "off"; to = "off";
} }

View file

@ -8,34 +8,23 @@
user = "homeassistant"; user = "homeassistant";
password = "hallo"; password = "hallo";
}; };
scenes = [{ scenes = [
name = "default"; { name = "default"; }
room_tracking_enabled = false; {
} name = "outside";
#{ room_tracking_enabled = false;
# name = "outside"; ignored_sensors = [ "zigbee2mqtt/door_sensor_4" ];
# room_tracking_enabled = false; }
# ignored_sensors = [ "zigbee2mqtt/door_sensor_4" ]; {
#} name = "night";
#{ room_tracking_enabled = false;
# name = "cooking"; brightness = 25;
# enabled_switches = [ "stat/PAL07/RESULT" "stat/PAL08/RESULT" ]; #disabled_switches = [
#} #"zigbee2mqtt/light_2"
#{ #];
# name = "night"; ignored_sensors = [ "zigbee2mqtt/motion_sensor_7" ];
# room_tracking_enabled = false; }
# brightness = 25; ];
# disabled_switches = [
# "stat/PAL01/RESULT"
# "stat/PAL03/RESULT"
# "stat/PAL04/RESULT"
# "stat/PAL07/RESULT"
# "stat/PAL08/RESULT"
# "zigbee2mqtt/light_2"
# ];
# ignored_sensors = [ "zigbee2mqtt/motion_sensor_7" ];
#}
];
sensors = let sensors = let
door = { topic, room }: { door = { topic, room }: {
topic = topic; topic = topic;
@ -51,6 +40,7 @@
delay = 60; delay = 60;
}; };
in [ in [
(motion { (motion {
topic = "zigbee2mqtt/motion_sensor_1"; topic = "zigbee2mqtt/motion_sensor_1";
room = "office_room"; room = "office_room";
@ -59,42 +49,25 @@
topic = "zigbee2mqtt/motion_sensor_2"; topic = "zigbee2mqtt/motion_sensor_2";
room = "office_room"; room = "office_room";
}) })
#(motion { (motion {
# topic = "zigbee2mqtt/motion_sensor_7"; topic = "zigbee2mqtt/motion_sensor_7";
# room = "bed_room"; room = "sleeping_room";
#}) })
#(motion {
# topic = "zigbee2mqtt/motion_sensor_1"; (door {
# room = "kitchen"; topic = "zigbee2mqtt/door_sensor_1";
#}) room = "storage_room";
#(motion { })
# topic = "zigbee2mqtt/motion_sensor_3"; (door {
# room = "living_room"; topic = "zigbee2mqtt/door_sensor_5";
#}) room = "sleeping_room";
#(motion { })
# topic = "zigbee2mqtt/motion_sensor_4"; (door {
# room = "living_room"; # house door
#}) topic = "zigbee2mqtt/door_sensor_4";
#(motion { room = "floor";
# topic = "zigbee2mqtt/motion_sensor_5"; })
# room = "bath_room";
#})
#(motion {
# topic = "zigbee2mqtt/motion_sensor_8";
# room = "bath_room";
#})
#(motion {
# topic = "zigbee2mqtt/motion_sensor_6";
# room = "floor";
#})
#(door {
# topic = "zigbee2mqtt/door_sensor_2";
# room = "floor";
#})
#(door {
# topic = "zigbee2mqtt/door_sensor_4";
# room = "floor";
#})
]; ];
switches = let switches = let
sonoff = { id, rooms, delay ? 0 }: { sonoff = { id, rooms, delay ? 0 }: {
@ -122,20 +95,20 @@
off = "OFF"; off = "OFF";
}; };
}; };
led = { topic, rooms, delay ? 0 }: {
topic = topic;
key = "state";
rooms = rooms;
delay = delay;
command = {
command = ''
{"state":"{{state}}","brightness":{{brightness}},"color":{"hex":"#FFFFFF}}'';
topic = "${topic}/set";
on = "ON";
off = "OFF";
};
};
in [ in [
#(light {
# topic = "zigbee2mqtt/light_1";
# rooms = [ "floor" ];
#})
#(light {
# topic = "zigbee2mqtt/light_2";
# rooms = [ "floor" ];
#})
#(light {
# topic = "zigbee2mqtt/light_3";
# rooms = [ "living_room" ];
# delay = 10;
#})
(light { (light {
topic = "zigbee2mqtt/light_2"; topic = "zigbee2mqtt/light_2";
@ -145,6 +118,18 @@
topic = "zigbee2mqtt/light_4"; topic = "zigbee2mqtt/light_4";
rooms = [ "office_room" ]; rooms = [ "office_room" ];
}) })
(light {
topic = "zigbee2mqtt/light_5";
rooms = [ "storage_room" ];
})
(light {
topic = "zigbee2mqtt/light_7";
rooms = [ "sleeping_room" ];
})
#(led {
# topic = "zigbee2mqtt/led_2";
# rooms = [ "sleeping_room" ];
#})
#(sonoff { #(sonoff {
# id = "PAL01"; # id = "PAL01";

View file

@ -3,26 +3,11 @@ let
# https://www.zigbee2mqtt.io/devices/MCCGQ11LM.html # https://www.zigbee2mqtt.io/devices/MCCGQ11LM.html
allDevices = { allDevices = {
"window_sensor_1" = { "door_sensor_1" = { id = "0x00158d000312dc52"; };
id = "0x00158d000312dc52"; "door_sensor_2" = { id = "0x00158d000316d5bf"; };
groups = [ "living_room" ]; "door_sensor_3" = { id = "0x00158d0002f9516f"; };
}; "door_sensor_4" = { id = "0x00158d00031383b9"; };
"door_sensor_2" = { "door_sensor_5" = { id = "0x00158d0003120d3e"; };
id = "0x00158d000316d5bf";
groups = [ "floor_room" ];
};
"window_sensor_3" = {
id = "0x00158d0002f9516f";
groups = [ "kitchen_room" ];
};
"door_sensor_4" = {
id = "0x00158d00031383b9";
groups = [ "floor_room" ];
};
"window_sensor_5" = {
id = "0x00158d0003120d3e";
groups = [ "bath_room" ];
};
}; };
in { in {

View file

@ -3,34 +3,14 @@ let
# https://www.zigbee2mqtt.io/devices/AC10787.html # https://www.zigbee2mqtt.io/devices/AC10787.html
allDevices = { allDevices = {
"light_1" = { "light_1" = { id = "0x7cb03eaa0a0347b5"; };
id = "0x7cb03eaa0a0347b5"; "light_2" = { id = "0x7cb03eaa0a0387b9"; };
groups = [ "light_3" = { id = "0x7cb03eaa0a033a86"; };
"floor_room" "light_4" = { id = "0x7cb03eaa0a04aabf"; };
"floor_room_bright"
"floor_room_essential"
"floor_room_lights"
];
};
"light_2" = {
id = "0x7cb03eaa0a0387b9";
groups = [ "floor_room" ];
};
"light_3" = {
id = "0x7cb03eaa0a033a86";
groups = [ "living_room" ];
};
"light_4" = {
id = "0x7cb03eaa0a04aabf";
groups = [ "bath_room" ];
};
"light_5" = { id = "0x7cb03eaa0a0346e4"; }; "light_5" = { id = "0x7cb03eaa0a0346e4"; };
"light_6" = { id = "0x7cb03eaa0a034b46"; }; "light_6" = { id = "0x7cb03eaa0a034b46"; };
"light_7" = { id = "0x7cb03eaa0a033b4f"; }; "light_7" = { id = "0x7cb03eaa0a033b4f"; };
"light_8" = { "light_8" = { id = "0x7cb03eaa0a0384d3"; };
id = "0x7cb03eaa0a0384d3";
groups = [ "bed_room" ];
};
}; };
in { in {