Compare commits
No commits in common. "550aba79f0e23f5707cc75aad41277e4ca7a8d20" and "016da3ab5ab8778d3c300181c84b273f9a2bf4bb" have entirely different histories.
550aba79f0
...
016da3ab5a
@ -132,10 +132,6 @@ in
|
|||||||
{ ethernetAddress = "00:1f:c6:6e:d1:f1"; hostName = "minecraftos"; ipAddress = "10.30.135.35"; }
|
{ ethernetAddress = "00:1f:c6:6e:d1:f1"; hostName = "minecraftos"; ipAddress = "10.30.135.35"; }
|
||||||
{ ethernetAddress = "b4:2e:99:ed:24:26"; hostName = "paul-fixe"; ipAddress = "10.30.135.71"; }
|
{ ethernetAddress = "b4:2e:99:ed:24:26"; hostName = "paul-fixe"; ipAddress = "10.30.135.71"; }
|
||||||
|
|
||||||
#ESPHome
|
|
||||||
{ ethernetAddress = "e0:98:06:85:e9:ce"; hostName = "salonled"; ipAddress = "10.30.40.1"; }
|
|
||||||
{ ethernetAddress = "e0:98:06:86:38:fc"; hostName = "bureauled"; ipAddress = "10.30.40.2"; }
|
|
||||||
|
|
||||||
# YeeLights
|
# YeeLights
|
||||||
{ ethernetAddress = "04:cf:8c:b5:7e:18"; hostName = "yeelink-light-color3_miap7e18"; ipAddress = "10.40.249.0"; }
|
{ ethernetAddress = "04:cf:8c:b5:7e:18"; hostName = "yeelink-light-color3_miap7e18"; ipAddress = "10.40.249.0"; }
|
||||||
{ ethernetAddress = "04:cf:8c:b5:2d:28"; hostName = "yeelink-light-color3_miap2d28"; ipAddress = "10.40.249.1"; }
|
{ ethernetAddress = "04:cf:8c:b5:2d:28"; hostName = "yeelink-light-color3_miap2d28"; ipAddress = "10.40.249.1"; }
|
||||||
|
@ -51,6 +51,18 @@ in
|
|||||||
path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";
|
path = "${pkgs.writeShellScriptBin "smartctl" "/run/wrappers/bin/sudo ${pkgs.smartmontools}/bin/smartctl $@"}/bin/smartctl";
|
||||||
};
|
};
|
||||||
exec= [
|
exec= [
|
||||||
|
{ commands = [
|
||||||
|
"${pkgs.python}/bin/python ${
|
||||||
|
pkgs.fetchgit {
|
||||||
|
url = "https://gitlab.com/nyanloutre/tplink-smartplug.git";
|
||||||
|
rev = "a0996112fc451b76448589698de440ad5fd6ea79";
|
||||||
|
sha256 = "1f1625g7rfsddgk428g76p8fr7vz5gfhq3f452q17bjni3rf2pj3";
|
||||||
|
}
|
||||||
|
}/tplink_smartplug.py -t 10.30.50.7 -c energy"
|
||||||
|
];
|
||||||
|
data_format = "json";
|
||||||
|
name_suffix = "_tplink-smartplug";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
commands = [
|
commands = [
|
||||||
"${pkgs.python3}/bin/python ${pkgs.writeText "zpool.py" ''
|
"${pkgs.python3}/bin/python ${pkgs.writeText "zpool.py" ''
|
||||||
|
@ -240,27 +240,16 @@ in
|
|||||||
|
|
||||||
home-assistant = {
|
home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# package = pkgs.home-assistant.override {
|
||||||
|
# extraPackages = ps: with ps; [ aiohttp-cors netdisco zeroconf ];
|
||||||
|
# };
|
||||||
config = {
|
config = {
|
||||||
homeassistant = {
|
default_config = null;
|
||||||
elevation = 143;
|
|
||||||
};
|
|
||||||
influxdb = null;
|
|
||||||
config = null;
|
|
||||||
frontend = null;
|
|
||||||
history = null;
|
|
||||||
logbook = null;
|
|
||||||
map = null;
|
|
||||||
mobile_app = null;
|
|
||||||
person = null;
|
|
||||||
script = null;
|
|
||||||
sun = null;
|
|
||||||
system_health = null;
|
|
||||||
yeelight.devices = {
|
yeelight.devices = {
|
||||||
"10.40.249.0".name = "Chambre";
|
"10.40.249.0".name = "Chambre";
|
||||||
"10.40.249.1".name = "Bureau";
|
"10.40.249.1".name = "Bureau";
|
||||||
"10.40.249.2".name = "Cuisine";
|
"10.40.249.2".name = "Cuisine";
|
||||||
};
|
};
|
||||||
esphome = null;
|
|
||||||
light = [
|
light = [
|
||||||
{
|
{
|
||||||
platform = "group";
|
platform = "group";
|
||||||
@ -277,41 +266,6 @@ in
|
|||||||
host = "10.30.0.1";
|
host = "10.30.0.1";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
tplink.switch = [
|
|
||||||
{ host = "10.30.50.7"; }
|
|
||||||
];
|
|
||||||
sensor = [
|
|
||||||
{
|
|
||||||
platform = "template";
|
|
||||||
sensors = {
|
|
||||||
serveur_amps = {
|
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Current";
|
|
||||||
value_template = ''{{ states.switch.serveur.attributes["current_a"] | float }}'';
|
|
||||||
unit_of_measurement = "A";
|
|
||||||
};
|
|
||||||
serveur_watts = {
|
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Current Consumption";
|
|
||||||
value_template = ''{{ states.switch.serveur.attributes["current_power_w"] | float }}'';
|
|
||||||
unit_of_measurement = "W";
|
|
||||||
};
|
|
||||||
serveur_total_kwh = {
|
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Total Consumption";
|
|
||||||
value_template = ''{{ states.switch.serveur.attributes["total_energy_kwh"] | float }}'';
|
|
||||||
unit_of_measurement = "kWh";
|
|
||||||
};
|
|
||||||
serveur_volts = {
|
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Voltage";
|
|
||||||
value_template = ''{{ states.switch.serveur.attributes["voltage"] | float }}'';
|
|
||||||
unit_of_measurement = "V";
|
|
||||||
};
|
|
||||||
serveur_today_kwh = {
|
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Today's Consumption";
|
|
||||||
value_template = ''{{ states.switch.serveur.attributes["today_energy_kwh"] | float }}'';
|
|
||||||
unit_of_measurement = "kWh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
switch = [
|
switch = [
|
||||||
{
|
{
|
||||||
platform = "wake_on_lan";
|
platform = "wake_on_lan";
|
||||||
@ -321,71 +275,14 @@ in
|
|||||||
broadcast_address = "10.30.255.255";
|
broadcast_address = "10.30.255.255";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
scene = [
|
automation = [
|
||||||
{
|
|
||||||
name = "Movie";
|
|
||||||
icon = "mdi:movie-open";
|
|
||||||
entities = {
|
|
||||||
"light.salon" = {
|
|
||||||
state = "on";
|
|
||||||
xy_color = [0.299 0.115];
|
|
||||||
brightness = 50;
|
|
||||||
};
|
|
||||||
"light.bande_led_tv" = {
|
|
||||||
state = "on";
|
|
||||||
effect = "Movie";
|
|
||||||
brightness = 180;
|
|
||||||
};
|
|
||||||
"light.bande_led_bureau" = {
|
|
||||||
state = "on";
|
|
||||||
xy_color = [0.299 0.115];
|
|
||||||
brightness = 130;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Home";
|
|
||||||
icon = "mdi:home";
|
|
||||||
entities = {
|
|
||||||
"light.salon" = {
|
|
||||||
state = "on";
|
|
||||||
kelvin = 2700;
|
|
||||||
brightness = 255;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Night";
|
|
||||||
icon = "mdi:weather-night";
|
|
||||||
entities = {
|
|
||||||
"light.salon" = {
|
|
||||||
state = "off";
|
|
||||||
};
|
|
||||||
"light.bande_led_tv" = {
|
|
||||||
state = "off";
|
|
||||||
};
|
|
||||||
"light.bande_led_bureau" = {
|
|
||||||
state = "off";
|
|
||||||
};
|
|
||||||
"light.chambre" = {
|
|
||||||
state = "on";
|
|
||||||
kelvin = 1900;
|
|
||||||
brightness = 50;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
automation = let
|
|
||||||
min_sun_elevation = 4;
|
|
||||||
in [
|
|
||||||
{
|
{
|
||||||
alias = "Aziz lumière";
|
alias = "Aziz lumière";
|
||||||
trigger = [
|
trigger = [
|
||||||
{
|
{
|
||||||
platform = "numeric_state";
|
platform = "sun";
|
||||||
entity_id = "sun.sun";
|
event = "sunset";
|
||||||
value_template = "{{ state.attributes.elevation }}";
|
offset = "-01:00:00";
|
||||||
below = min_sun_elevation;
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
platform = "state";
|
platform = "state";
|
||||||
@ -400,12 +297,14 @@ in
|
|||||||
state = "home";
|
state = "home";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
condition = "template";
|
condition = "time";
|
||||||
value_template = "{{ state_attr('sun.sun', 'elevation') < ${toString min_sun_elevation} }}";
|
after = "16:00:00";
|
||||||
|
before = "23:00:00";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
action = {
|
action = {
|
||||||
scene = "scene.home";
|
service = "light.turn_on";
|
||||||
|
entity_id = "light.salon";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user