odin: HASS climate configuration

This commit is contained in:
Filippo Berto 2025-05-25 16:46:40 +02:00
parent 13493034e3
commit 91db9d4399
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
2 changed files with 70 additions and 19 deletions

View file

@ -226,17 +226,66 @@
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"; };
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 {
version = "1.17.13";
# smartir-zha = super.buildHomeAssistantComponent rec {
# 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 {
owner = "smartHomeHub";
owner = "bertof";
repo = "SmartIR";
rev = version;
hash = "sha256-fOd2MTBi0q+lBl6JYV1yGp9A42+BOD6/2SxYSBKy8fE=";
rev = "6f8cac1";
hash = "sha256-5Ulb3z46bfIzztHTMNg/Vc26ru9K40242AsW37TLE18=";
};
patches = [ ];
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 | sed 's/MQTT/ZHA' > codes/climate/50.json
sed 's/Broadlink/ZHA/' codes/climate/1946.json > codes/climate/50.json
'';
});

View file

@ -281,6 +281,7 @@ in
logbook = { };
# logger.default = "debug";
logger.default = "info";
logger.logs.zhaquirks = "debug";
# "map" = { };
mobile_app = { };
notify = [
@ -320,18 +321,17 @@ in
name = "Climatizzatore";
unique_id = "climatizzatore";
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";
humidity_sensor = "sensor.tz3000_fllyghyj_ts0201_humidity";
power_sensor = "binary_sensor.climatizzatore_acceso";
power_sensor_restore_state = true;
}];
};
configDir = "/var/lib/hass";
configWritable = true;
extraPackages = ps: with ps; [ securetar ];
customComponents = [
pkgs.home-assistant-custom-components.smartir
];
customComponents = [ pkgs.smartir-zha ];
extraComponents = [
"default_config"
@ -375,6 +375,7 @@ in
"media_player"
"met"
"meteoalarm"
"mqtt"
"network"
# "nextcloud"
"nmap_tracker"
@ -409,7 +410,8 @@ in
"zoneminder"
];
};
logind.lidSwitch = "ignore";
logind.lidSwitch =
"ignore";
pipewire = {
enable = true;
pulse.enable = true;