box: switch to a different openevse component for ha

This commit is contained in:
Aaron Bieber 2023-12-24 14:14:02 -07:00
parent 520e4ff520
commit 81199facf2
No known key found for this signature in database
3 changed files with 50 additions and 26 deletions

View File

@ -325,6 +325,8 @@
};
hpi =
upkgs.python3Packages.callPackage ./pkgs/hpi.nix { inherit upkgs; };
openevse =
upkgs.python3Packages.callPackage ./pkgs/openevse.nix { inherit upkgs; };
promnesia = upkgs.python3Packages.callPackage ./pkgs/promnesia.nix {
inherit upkgs;
};

View File

@ -297,6 +297,9 @@ in
pymetno
ical
];
customComponents = [
(pkgs.python3Packages.callPackage ../../pkgs/openevse.nix { inherit (pkgs.home-assistant) pkgs; })
];
extraComponents = [
"airthings"
"airthings_ble"
@ -317,7 +320,6 @@ in
"mqtt"
"nextdns"
"octoprint"
"openevse"
"prometheus"
"pushover"
"rest"
@ -326,19 +328,6 @@ in
];
config = {
sensor = [
{
platform = "openevse";
host = "10.6.0.166";
monitored_variables = [
"status"
"charge_time"
"rtc_temp"
"ir_temp"
"ambient_temp"
"usage_session"
"usage_total"
];
}
];
mqtt.sensor = [
{
@ -353,23 +342,11 @@ in
state_topic = "greenhouse/humidity";
unit_of_measurement = "%";
}
{
name = "OpenEVSE Temperature";
unique_id = "c55719a7-3e16-4249-9f9f-d93e8f0b10f1";
icon = "mdi:thermometer";
state_topic = "openevse/temp";
device_class = "temperature";
state_class = "measurement";
unit_of_measurement = "°C";
value_template = "{{ value|float / 10.0 }}";
expire_after = 40;
}
];
logger = {
default = "warning";
logs = {
#"homeassistant.components.aprs" = "debug";
"homeassistant.components.openevse" = "debug";
};
};
"automation manual" = [

45
pkgs/openevse.nix Normal file
View File

@ -0,0 +1,45 @@
{ buildPythonPackage
, buildHomeAssistantComponent
, setuptools-scm
, setuptools
, fetchFromGitHub
, fetchPypi
, ...
}:
let
python-openevse-http = buildPythonPackage rec {
pname = "python-openevse-http";
version = "0.1.57";
pyproject = true;
nativeBuildInputs = [ setuptools ];
src = fetchPypi {
inherit pname version;
hash = "sha256-fyoXjOwsublB8K4MSaOirTH1r1g3ZxokQdMmglP51Fw=";
};
};
in
buildHomeAssistantComponent rec {
owner = "firstof9";
domain = "openevse";
version = "2.1.32";
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
python-openevse-http
];
buildInputs = [ setuptools-scm ];
src = fetchFromGitHub {
inherit owner;
repo = domain;
rev = version;
hash = "sha256-7DsctUJKYR81DgJCDskCO79C8wHp0cpZP32vfjnxSHY=";
};
}