feat(hass): setup zigbee lamp
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-12-27 05:58:43 -05:00
parent 262873e28a
commit 735521a8a5
3 changed files with 82 additions and 0 deletions

View file

@ -8,6 +8,7 @@
./bluetooth.nix ./bluetooth.nix
./firmware.nix ./firmware.nix
./frontend.nix ./frontend.nix
./zigbee.nix
./netdaemon ./netdaemon
./spotify ./spotify

View file

@ -92,6 +92,7 @@ in {
inherit inherit
(pkgs.home-assistant-custom-lovelace-modules) (pkgs.home-assistant-custom-lovelace-modules)
card-mod card-mod
light-entity-card
universal-remote-card universal-remote-card
; ;
@ -105,6 +106,7 @@ in {
themes = "!include_dir_merge_named themes"; themes = "!include_dir_merge_named themes";
extra_module_url = map (p: "/local/nixos-lovelace-modules/${p}.js") [ extra_module_url = map (p: "/local/nixos-lovelace-modules/${p}.js") [
"card-mod" "card-mod"
"light-entity-card"
"custom-sidebar-yaml" "custom-sidebar-yaml"
]; ];
}; };
@ -142,6 +144,34 @@ in {
]; ];
} }
{
type = "custom:light-entity-card";
entity = "light.tz3210_katchgxy_ts0505b_light";
shorten_cards = false;
consolidate_entities = false;
child_card = false;
hide_header = false;
show_header_icon = false;
header = "";
color_wheel = true;
persist_features = true;
brightness = true;
color_temp = true;
white_value = true;
color_picker = true;
speed = true;
intensity = false;
force_features = false;
show_slider_percent = true;
full_width_sliders = true;
brightness_icon = "weather-sunny";
white_icon = "file-word-box";
temperature_icon = "thermometer";
speed_icon = "speedometer";
intensity_icon = "transit-connection-horizontal";
}
{ {
type = "custom:android-tv-card"; type = "custom:android-tv-card";

View file

@ -0,0 +1,51 @@
{...}: let
zigbeeUser = "moskit";
in {
services = {
home-assistant = {
extraComponents = [
"mqtt"
"smlight"
"zha"
];
};
mosquitto = {
enable = true;
listeners = [
{
acl = ["topic readwrite #"];
port = 1883;
settings.allow_anonymous = true;
users."${zigbeeUser}".acl = ["readwrite #"];
}
];
};
zigbee2mqtt = {
enable = true;
settings = {
serial = {
port = "tcp://192.168.0.129:6638";
baudrate = 115200;
adapter = "zstack";
disable_led = false;
};
mqtt = {
server = "mqtt://localhost/1883";
user = zigbeeUser;
};
frontend = {
port = 8080;
host = "100.64.0.10";
};
advanced.transmit_power = 20;
};
};
};
}