Odin: smart ir custom code

This commit is contained in:
Filippo Berto 2025-06-19 19:24:33 +02:00
parent c7384520ff
commit 8abfae405a
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
2 changed files with 10 additions and 5 deletions

View file

@ -258,6 +258,10 @@
rev = "6f8cac1";
hash = "sha256-5Ulb3z46bfIzztHTMNg/Vc26ru9K40242AsW37TLE18=";
};
code = super.fetchurl {
url = "https://gist.githubusercontent.com/bertof/d2a4af6243300b9ba05638af9a29fa6d/raw/6dbb21db986db15f69bb3040585419a270693289/50.json";
sha256 = "sha256-9564yMudzY8Z9RzvLqJxuV4k6PLBVJdph71BOz6OXRc=";
};
patcher = super.fetchurl {
url = "https://gist.githubusercontent.com/svyatogor/7839d00303998a9fa37eb48494dd680f/raw/66cba20e653f84aab0b9a31ea5b9ca497d038d8a/broadlink_to_tuya.py";
@ -265,8 +269,9 @@
};
postPatch = ''
# ${super.python312}/bin/python3 ${patcher} codes/climate/1946.json > codes/climate/50.json
sed 's/Broadlink/MQTT/' codes/climate/1946.json > codes/climate/50.json
${super.python312}/bin/python3 ${patcher} codes/climate/1946.json > codes/climate/50.json
# sed 's/Broadlink/MQTT/' codes/climate/1946.json > codes/climate/50.json
# cp ${code} codes/climate/50.json
'';
});