odin: HASS climate configuration
This commit is contained in:
parent
13493034e3
commit
91db9d4399
2 changed files with 70 additions and 19 deletions
63
flake.nix
63
flake.nix
|
|
@ -226,17 +226,66 @@
|
||||||
google-chrome = super.google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; };
|
google-chrome = super.google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; };
|
||||||
brave = super.brave.override { commandLineArgs = "--ozone-platform=wayland --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"; };
|
brave = super.brave.override { commandLineArgs = "--ozone-platform=wayland --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"; };
|
||||||
sddm-theme-clairvoyance = super.sddm-theme-clairvoyance.override { wallpaper = ./wallpapers/background.jpg; };
|
sddm-theme-clairvoyance = super.sddm-theme-clairvoyance.override { wallpaper = ./wallpapers/background.jpg; };
|
||||||
home-assistant-custom-components.smartir = super.home-assistant-custom-components.smartir.overrideAttrs
|
|
||||||
(_attr: rec {
|
# smartir-zha = super.buildHomeAssistantComponent rec {
|
||||||
version = "1.17.13";
|
# owner = "smartHomeHub";
|
||||||
|
# domain = "smartir";
|
||||||
|
# version = "04ac27e";
|
||||||
|
|
||||||
|
# src = super.fetchFromGitHub {
|
||||||
|
# owner = "bertof";
|
||||||
|
# repo = "SmartIR";
|
||||||
|
# rev = "6f8cac1";
|
||||||
|
# hash = "sha256-Xb6tL33vdevT2cRI80cNf744lKBHJDhFYiG2NsOlzaQ=";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# patcher = super.fetchurl {
|
||||||
|
# url = "https://gist.githubusercontent.com/svyatogor/7839d00303998a9fa37eb48494dd680f/raw/66cba20e653f84aab0b9a31ea5b9ca497d038d8a/broadlink_to_tuya.py";
|
||||||
|
# sha256 = "0m5fbfvsq8sxm0ghs8al8b6z4vfycqkr90qb10w9c4ryag2flnsh";
|
||||||
|
# };
|
||||||
|
|
||||||
|
# postPatch = ''
|
||||||
|
# # ${super.python312}/bin/python3 ${patcher} codes/climate/1946.json > codes/climate/50.json
|
||||||
|
# cp codes/climate/1946.json codes/climate/50.json
|
||||||
|
# sed -i 's/MQTT/ZHA/' codes/climate/50.json
|
||||||
|
# '';
|
||||||
|
|
||||||
|
# dependencies = [
|
||||||
|
# super.python313Packages.aiofiles
|
||||||
|
# super.python313Packages.distutils
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# postInstall = ''
|
||||||
|
# cp -r codes $out/custom_components/smartir/
|
||||||
|
# '';
|
||||||
|
|
||||||
|
# passthru.updateScript = super.nix-update-script { };
|
||||||
|
|
||||||
|
# meta = with super.lib; {
|
||||||
|
# changelog = "https://github.com/smartHomeHub/SmartIR/releases/tag/v${version}";
|
||||||
|
# description = "Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)";
|
||||||
|
# homepage = "https://github.com/smartHomeHub/SmartIR";
|
||||||
|
# maintainers = with maintainers; [ azuwis ];
|
||||||
|
# license = licenses.mit;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
smartir-zha = super.home-assistant-custom-components.smartir.overrideAttrs (_attr: rec {
|
||||||
|
version = "04ac27e";
|
||||||
src = super.fetchFromGitHub {
|
src = super.fetchFromGitHub {
|
||||||
owner = "smartHomeHub";
|
owner = "bertof";
|
||||||
repo = "SmartIR";
|
repo = "SmartIR";
|
||||||
rev = version;
|
rev = "6f8cac1";
|
||||||
hash = "sha256-fOd2MTBi0q+lBl6JYV1yGp9A42+BOD6/2SxYSBKy8fE=";
|
hash = "sha256-5Ulb3z46bfIzztHTMNg/Vc26ru9K40242AsW37TLE18=";
|
||||||
};
|
};
|
||||||
patches = [ ];
|
|
||||||
|
patcher = super.fetchurl {
|
||||||
|
url = "https://gist.githubusercontent.com/svyatogor/7839d00303998a9fa37eb48494dd680f/raw/66cba20e653f84aab0b9a31ea5b9ca497d038d8a/broadlink_to_tuya.py";
|
||||||
|
sha256 = "0m5fbfvsq8sxm0ghs8al8b6z4vfycqkr90qb10w9c4ryag2flnsh";
|
||||||
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
# ${super.python312}/bin/python3 ${patcher} codes/climate/1946.json | sed 's/MQTT/ZHA' > codes/climate/50.json
|
||||||
sed 's/Broadlink/ZHA/' codes/climate/1946.json > codes/climate/50.json
|
sed 's/Broadlink/ZHA/' codes/climate/1946.json > codes/climate/50.json
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -281,6 +281,7 @@ in
|
||||||
logbook = { };
|
logbook = { };
|
||||||
# logger.default = "debug";
|
# logger.default = "debug";
|
||||||
logger.default = "info";
|
logger.default = "info";
|
||||||
|
logger.logs.zhaquirks = "debug";
|
||||||
# "map" = { };
|
# "map" = { };
|
||||||
mobile_app = { };
|
mobile_app = { };
|
||||||
notify = [
|
notify = [
|
||||||
|
|
@ -320,18 +321,17 @@ in
|
||||||
name = "Climatizzatore";
|
name = "Climatizzatore";
|
||||||
unique_id = "climatizzatore";
|
unique_id = "climatizzatore";
|
||||||
device_code = 50;
|
device_code = 50;
|
||||||
controller_data = "switch.tz3290_gnl5a6a5xvql7c2a_ts1201_interruttore";
|
controller_data = "a4:9e:69:ff:fe:01:2c:03";
|
||||||
temperature_sensor = "sensor.tz3000_fllyghyj_ts0201_temperature";
|
temperature_sensor = "sensor.tz3000_fllyghyj_ts0201_temperature";
|
||||||
humidity_sensor = "sensor.tz3000_fllyghyj_ts0201_humidity";
|
humidity_sensor = "sensor.tz3000_fllyghyj_ts0201_humidity";
|
||||||
power_sensor = "binary_sensor.climatizzatore_acceso";
|
power_sensor = "binary_sensor.climatizzatore_acceso";
|
||||||
|
power_sensor_restore_state = true;
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
configDir = "/var/lib/hass";
|
configDir = "/var/lib/hass";
|
||||||
configWritable = true;
|
configWritable = true;
|
||||||
extraPackages = ps: with ps; [ securetar ];
|
extraPackages = ps: with ps; [ securetar ];
|
||||||
customComponents = [
|
customComponents = [ pkgs.smartir-zha ];
|
||||||
pkgs.home-assistant-custom-components.smartir
|
|
||||||
];
|
|
||||||
extraComponents = [
|
extraComponents = [
|
||||||
"default_config"
|
"default_config"
|
||||||
|
|
||||||
|
|
@ -375,6 +375,7 @@ in
|
||||||
"media_player"
|
"media_player"
|
||||||
"met"
|
"met"
|
||||||
"meteoalarm"
|
"meteoalarm"
|
||||||
|
"mqtt"
|
||||||
"network"
|
"network"
|
||||||
# "nextcloud"
|
# "nextcloud"
|
||||||
"nmap_tracker"
|
"nmap_tracker"
|
||||||
|
|
@ -409,7 +410,8 @@ in
|
||||||
"zoneminder"
|
"zoneminder"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
logind.lidSwitch = "ignore";
|
logind.lidSwitch =
|
||||||
|
"ignore";
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue