fix home assistant
This commit is contained in:
parent
ef246753b8
commit
4572c8c81b
@ -174,31 +174,35 @@ in
|
|||||||
|
|
||||||
home-assistant = {
|
home-assistant = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
extraComponents = [
|
||||||
|
# Components required to complete the onboarding
|
||||||
|
"met"
|
||||||
|
"radio_browser"
|
||||||
|
];
|
||||||
config = {
|
config = {
|
||||||
|
default_config = {};
|
||||||
homeassistant = {
|
homeassistant = {
|
||||||
elevation = 143;
|
latitude = 48.60038;
|
||||||
|
longitude = 7.74063;
|
||||||
|
elevation = 146;
|
||||||
};
|
};
|
||||||
influxdb = null;
|
meteo_france = null;
|
||||||
config = null;
|
#influxdb = null;
|
||||||
dhcp = null;
|
#config = null;
|
||||||
frontend = null;
|
#dhcp = null;
|
||||||
history = null;
|
#frontend = null;
|
||||||
|
#history = null;
|
||||||
http = {
|
http = {
|
||||||
use_x_forwarded_for = true;
|
use_x_forwarded_for = true;
|
||||||
trusted_proxies = [ "127.0.0.1" ];
|
trusted_proxies = [ "127.0.0.1" ];
|
||||||
};
|
};
|
||||||
logbook = null;
|
#logbook = null;
|
||||||
map = null;
|
#map = null;
|
||||||
mobile_app = null;
|
#mobile_app = null;
|
||||||
person = null;
|
#person = null;
|
||||||
script = null;
|
#script = null;
|
||||||
sun = null;
|
#sun = null;
|
||||||
system_health = null;
|
#system_health = null;
|
||||||
yeelight.devices = {
|
|
||||||
"10.40.249.0".name = "Chambre";
|
|
||||||
"10.40.249.1".name = "Bureau";
|
|
||||||
"10.40.249.2".name = "Cuisine";
|
|
||||||
};
|
|
||||||
zha = null;
|
zha = null;
|
||||||
esphome = null;
|
esphome = null;
|
||||||
light = [
|
light = [
|
||||||
@ -206,8 +210,9 @@ in
|
|||||||
platform = "group";
|
platform = "group";
|
||||||
name = "Salon";
|
name = "Salon";
|
||||||
entities = [
|
entities = [
|
||||||
"light.bureau"
|
"light.ikea_of_sweden_tradfri_bulb_e27_cws_806lm_e69e6dfe_level_light_color_on_off"
|
||||||
"light.cuisine"
|
"light.ikea_of_sweden_tradfri_bulb_e27_cws_806lm_43c25efe_level_light_color_on_off"
|
||||||
|
"light.ikea_of_sweden_tradfri_bulb_e27_cws_806lm_3d0f76fe_level_light_color_on_off"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -217,317 +222,317 @@ in
|
|||||||
host = "10.30.0.1";
|
host = "10.30.0.1";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
tplink.switch = [
|
#tplink.switch = [
|
||||||
{ host = "10.30.50.7"; }
|
# { host = "10.30.50.7"; }
|
||||||
];
|
#];
|
||||||
sensor = [
|
#sensor = [
|
||||||
{
|
# {
|
||||||
platform = "template";
|
# platform = "template";
|
||||||
sensors = {
|
# sensors = {
|
||||||
serveur_amps = {
|
# serveur_amps = {
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Current";
|
# friendly_name_template = "{{ states.switch.serveur.name}} Current";
|
||||||
value_template = ''{{ states.switch.serveur.attributes["current_a"] | float }}'';
|
# value_template = ''{{ states.switch.serveur.attributes["current_a"] | float }}'';
|
||||||
unit_of_measurement = "A";
|
# unit_of_measurement = "A";
|
||||||
};
|
# };
|
||||||
serveur_watts = {
|
# serveur_watts = {
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Current Consumption";
|
# friendly_name_template = "{{ states.switch.serveur.name}} Current Consumption";
|
||||||
value_template = ''{{ states.switch.serveur.attributes["current_power_w"] | float }}'';
|
# value_template = ''{{ states.switch.serveur.attributes["current_power_w"] | float }}'';
|
||||||
unit_of_measurement = "W";
|
# unit_of_measurement = "W";
|
||||||
};
|
# };
|
||||||
serveur_total_kwh = {
|
# serveur_total_kwh = {
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Total Consumption";
|
# friendly_name_template = "{{ states.switch.serveur.name}} Total Consumption";
|
||||||
value_template = ''{{ states.switch.serveur.attributes["total_energy_kwh"] | float }}'';
|
# value_template = ''{{ states.switch.serveur.attributes["total_energy_kwh"] | float }}'';
|
||||||
unit_of_measurement = "kWh";
|
# unit_of_measurement = "kWh";
|
||||||
};
|
# };
|
||||||
serveur_volts = {
|
# serveur_volts = {
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Voltage";
|
# friendly_name_template = "{{ states.switch.serveur.name}} Voltage";
|
||||||
value_template = ''{{ states.switch.serveur.attributes["voltage"] | float }}'';
|
# value_template = ''{{ states.switch.serveur.attributes["voltage"] | float }}'';
|
||||||
unit_of_measurement = "V";
|
# unit_of_measurement = "V";
|
||||||
};
|
# };
|
||||||
serveur_today_kwh = {
|
# serveur_today_kwh = {
|
||||||
friendly_name_template = "{{ states.switch.serveur.name}} Today's Consumption";
|
# friendly_name_template = "{{ states.switch.serveur.name}} Today's Consumption";
|
||||||
value_template = ''{{ states.switch.serveur.attributes["today_energy_kwh"] | float }}'';
|
# value_template = ''{{ states.switch.serveur.attributes["today_energy_kwh"] | float }}'';
|
||||||
unit_of_measurement = "kWh";
|
# unit_of_measurement = "kWh";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
];
|
#];
|
||||||
switch = [
|
#switch = [
|
||||||
{
|
# {
|
||||||
platform = "wake_on_lan";
|
# platform = "wake_on_lan";
|
||||||
name = "PC Fixe";
|
# name = "PC Fixe";
|
||||||
mac = "b4:2e:99:ed:24:26";
|
# mac = "b4:2e:99:ed:24:26";
|
||||||
host = "10.30.135.71";
|
# host = "10.30.135.71";
|
||||||
broadcast_address = "10.30.255.255";
|
# broadcast_address = "10.30.255.255";
|
||||||
}
|
# }
|
||||||
];
|
#];
|
||||||
device_tracker = [
|
#device_tracker = [
|
||||||
{
|
# {
|
||||||
platform = "ping";
|
# platform = "ping";
|
||||||
hosts = { telephone_paul = "10.30.50.2"; };
|
# hosts = { telephone_paul = "10.30.50.2"; };
|
||||||
}
|
# }
|
||||||
];
|
#];
|
||||||
scene = [
|
#scene = [
|
||||||
{
|
# {
|
||||||
name = "Movie";
|
# name = "Movie";
|
||||||
icon = "mdi:movie-open";
|
# icon = "mdi:movie-open";
|
||||||
entities = {
|
# entities = {
|
||||||
"light.salon" = {
|
# "light.salon" = {
|
||||||
state = "on";
|
# state = "on";
|
||||||
xy_color = [0.299 0.115];
|
# xy_color = [0.299 0.115];
|
||||||
brightness = 50;
|
# brightness = 50;
|
||||||
};
|
# };
|
||||||
"light.bande_led_tv" = {
|
# "light.bande_led_tv" = {
|
||||||
state = "on";
|
# state = "on";
|
||||||
effect = "Movie";
|
# effect = "Movie";
|
||||||
brightness = 180;
|
# brightness = 180;
|
||||||
};
|
# };
|
||||||
"light.bande_led_bureau" = {
|
# "light.bande_led_bureau" = {
|
||||||
state = "on";
|
# state = "on";
|
||||||
xy_color = [0.299 0.115];
|
# xy_color = [0.299 0.115];
|
||||||
brightness = 130;
|
# brightness = 130;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "Home";
|
# name = "Home";
|
||||||
icon = "mdi:home";
|
# icon = "mdi:home";
|
||||||
entities = {
|
# entities = {
|
||||||
"light.salon" = {
|
# "light.salon" = {
|
||||||
state = "on";
|
# state = "on";
|
||||||
kelvin = 2700;
|
# kelvin = 2700;
|
||||||
brightness = 255;
|
# brightness = 255;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
name = "Night";
|
# name = "Night";
|
||||||
icon = "mdi:weather-night";
|
# icon = "mdi:weather-night";
|
||||||
entities = {
|
# entities = {
|
||||||
"light.salon" = {
|
# "light.salon" = {
|
||||||
state = "off";
|
# state = "off";
|
||||||
};
|
# };
|
||||||
"light.bande_led_tv" = {
|
# "light.bande_led_tv" = {
|
||||||
state = "off";
|
# state = "off";
|
||||||
};
|
# };
|
||||||
"light.bande_led_bureau" = {
|
# "light.bande_led_bureau" = {
|
||||||
state = "off";
|
# state = "off";
|
||||||
};
|
# };
|
||||||
"light.chambre" = {
|
# "light.chambre" = {
|
||||||
state = "on";
|
# state = "on";
|
||||||
kelvin = 1900;
|
# kelvin = 1900;
|
||||||
brightness = 50;
|
# brightness = 50;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
];
|
#];
|
||||||
automation = let
|
#automation = let
|
||||||
min_sun_elevation = 4;
|
# min_sun_elevation = 4;
|
||||||
|
|
||||||
switch_chambre = {
|
# switch_chambre = {
|
||||||
domain = "zha";
|
# domain = "zha";
|
||||||
platform = "device";
|
# platform = "device";
|
||||||
device_id = "3329ecdcad244e5e8fc0f4b96d52ffe1";
|
# device_id = "3329ecdcad244e5e8fc0f4b96d52ffe1";
|
||||||
};
|
# };
|
||||||
|
|
||||||
switch_entree = {
|
# switch_entree = {
|
||||||
domain = "zha";
|
# domain = "zha";
|
||||||
platform = "device";
|
# platform = "device";
|
||||||
device_id = "7cd814190ec543dba76a7aa7e7996c41";
|
# device_id = "7cd814190ec543dba76a7aa7e7996c41";
|
||||||
};
|
# };
|
||||||
|
|
||||||
remote = {
|
# remote = {
|
||||||
domain = "zha";
|
# domain = "zha";
|
||||||
platform = "device";
|
# platform = "device";
|
||||||
device_id = "d1230b76264e483388a8fdaad4f44143";
|
# device_id = "d1230b76264e483388a8fdaad4f44143";
|
||||||
};
|
# };
|
||||||
in [
|
#in [
|
||||||
# ENTREE
|
# # ENTREE
|
||||||
|
|
||||||
{
|
# {
|
||||||
alias = "Aziz lumière";
|
# alias = "Aziz lumière";
|
||||||
trigger = [
|
# trigger = [
|
||||||
{
|
# {
|
||||||
platform = "numeric_state";
|
# platform = "numeric_state";
|
||||||
entity_id = "sun.sun";
|
# entity_id = "sun.sun";
|
||||||
value_template = "{{ state.attributes.elevation }}";
|
# value_template = "{{ state.attributes.elevation }}";
|
||||||
below = min_sun_elevation;
|
# below = min_sun_elevation;
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
condition = [
|
# condition = [
|
||||||
{
|
# {
|
||||||
condition = "state";
|
# condition = "state";
|
||||||
entity_id = "person.paul";
|
# entity_id = "person.paul";
|
||||||
state = "home";
|
# state = "home";
|
||||||
}
|
# }
|
||||||
# Sun below max elevation
|
# # Sun below max elevation
|
||||||
{
|
# {
|
||||||
condition = "template";
|
# condition = "template";
|
||||||
value_template = "{{ state_attr('sun.sun', 'elevation') < ${toString min_sun_elevation} }}";
|
# value_template = "{{ state_attr('sun.sun', 'elevation') < ${toString min_sun_elevation} }}";
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
action = {
|
# action = {
|
||||||
scene = "scene.home";
|
# scene = "scene.home";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Aziz lumière switch";
|
# alias = "Aziz lumière switch";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "turn_on";
|
# subtype = "turn_on";
|
||||||
} // switch_entree;
|
# } // switch_entree;
|
||||||
action = {
|
# action = {
|
||||||
scene = "scene.home";
|
# scene = "scene.home";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Adios";
|
# alias = "Adios";
|
||||||
trigger = [
|
# trigger = [
|
||||||
{
|
# {
|
||||||
platform = "state";
|
# platform = "state";
|
||||||
entity_id = "person.paul";
|
# entity_id = "person.paul";
|
||||||
to = "not_home";
|
# to = "not_home";
|
||||||
}
|
# }
|
||||||
({
|
# ({
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "turn_off";
|
# subtype = "turn_off";
|
||||||
} // switch_entree)
|
# } // switch_entree)
|
||||||
];
|
# ];
|
||||||
action = [
|
# action = [
|
||||||
{
|
# {
|
||||||
service = "light.turn_off";
|
# service = "light.turn_off";
|
||||||
entity_id = "all";
|
# entity_id = "all";
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
service = "media_player.turn_off";
|
# service = "media_player.turn_off";
|
||||||
entity_id = "all";
|
# entity_id = "all";
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
}
|
# }
|
||||||
|
|
||||||
# REMOTE
|
# # REMOTE
|
||||||
|
|
||||||
{
|
# {
|
||||||
alias = "Button toggle";
|
# alias = "Button toggle";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "turn_on";
|
# subtype = "turn_on";
|
||||||
} // remote;
|
# } // remote;
|
||||||
action = {
|
# action = {
|
||||||
choose = {
|
# choose = {
|
||||||
conditions = {
|
# conditions = {
|
||||||
condition = "template";
|
# condition = "template";
|
||||||
value_template = ''
|
# value_template = ''
|
||||||
{% set domain = 'light' %}
|
# {% set domain = 'light' %}
|
||||||
{% set state = 'off' %}
|
# {% set state = 'off' %}
|
||||||
{{ states[domain] | count == states[domain] | selectattr('state','eq',state) | list | count }}
|
# {{ states[domain] | count == states[domain] | selectattr('state','eq',state) | list | count }}
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
sequence = {
|
# sequence = {
|
||||||
scene = "scene.home";
|
# scene = "scene.home";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
default = {
|
# default = {
|
||||||
service = "light.turn_off";
|
# service = "light.turn_off";
|
||||||
entity_id = "all";
|
# entity_id = "all";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button scene movie";
|
# alias = "Button scene movie";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "right";
|
# subtype = "right";
|
||||||
} // remote;
|
# } // remote;
|
||||||
action = {
|
# action = {
|
||||||
scene = "scene.movie";
|
# scene = "scene.movie";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button scene home";
|
# alias = "Button scene home";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "left";
|
# subtype = "left";
|
||||||
} // remote;
|
# } // remote;
|
||||||
action = {
|
# action = {
|
||||||
scene = "scene.home";
|
# scene = "scene.home";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button light up";
|
# alias = "Button light up";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "dim_up";
|
# subtype = "dim_up";
|
||||||
} // remote;
|
# } // remote;
|
||||||
action = {
|
# action = {
|
||||||
service = "light.turn_on";
|
# service = "light.turn_on";
|
||||||
entity_id = "light.salon";
|
# entity_id = "light.salon";
|
||||||
data = {
|
# data = {
|
||||||
brightness_step = 25;
|
# brightness_step = 25;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button light down";
|
# alias = "Button light down";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "dim_down";
|
# subtype = "dim_down";
|
||||||
} // remote;
|
# } // remote;
|
||||||
action = {
|
# action = {
|
||||||
service = "light.turn_on";
|
# service = "light.turn_on";
|
||||||
entity_id = "light.salon";
|
# entity_id = "light.salon";
|
||||||
data = {
|
# data = {
|
||||||
brightness_step = -25;
|
# brightness_step = -25;
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
|
|
||||||
# CHAMBRE
|
# # CHAMBRE
|
||||||
|
|
||||||
{
|
# {
|
||||||
alias = "Button scene night";
|
# alias = "Button scene night";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "turn_on";
|
# subtype = "turn_on";
|
||||||
} // switch_chambre;
|
# } // switch_chambre;
|
||||||
action = {
|
# action = {
|
||||||
scene = "scene.night";
|
# scene = "scene.night";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button scene dodo";
|
# alias = "Button scene dodo";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_short_press";
|
# type = "remote_button_short_press";
|
||||||
subtype = "turn_off";
|
# subtype = "turn_off";
|
||||||
} // switch_chambre;
|
# } // switch_chambre;
|
||||||
action = {
|
# action = {
|
||||||
service = "light.turn_off";
|
# service = "light.turn_off";
|
||||||
entity_id = "all";
|
# entity_id = "all";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button scene lumière chambre ON";
|
# alias = "Button scene lumière chambre ON";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_long_press";
|
# type = "remote_button_long_press";
|
||||||
subtype = "dim_up";
|
# subtype = "dim_up";
|
||||||
} // switch_chambre;
|
# } // switch_chambre;
|
||||||
action = {
|
# action = {
|
||||||
service = "light.turn_on";
|
# service = "light.turn_on";
|
||||||
entity_id = "light.chambre";
|
# entity_id = "light.chambre";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
{
|
# {
|
||||||
alias = "Button scene lumière chambre OFF";
|
# alias = "Button scene lumière chambre OFF";
|
||||||
trigger = {
|
# trigger = {
|
||||||
type = "remote_button_long_press";
|
# type = "remote_button_long_press";
|
||||||
subtype = "dim_down";
|
# subtype = "dim_down";
|
||||||
} // switch_chambre;
|
# } // switch_chambre;
|
||||||
action = {
|
# action = {
|
||||||
service = "light.turn_off";
|
# service = "light.turn_off";
|
||||||
entity_id = "light.chambre";
|
# entity_id = "light.chambre";
|
||||||
};
|
# };
|
||||||
}
|
# }
|
||||||
];
|
#];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user