homeassistant disable heater

This commit is contained in:
Ingolf Wagner 2021-01-11 00:41:29 +01:00
parent 7284ffdec9
commit 05fed32fe3
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -66,8 +66,8 @@ in {
input_boolean.windows_up.icon = "mdi:toggle-switch"; input_boolean.windows_up.icon = "mdi:toggle-switch";
# heater scenes # heater scenes
input_select.heater_state.options = [ "off" "on1" "on2" "on3" ]; #input_select.heater_state.options = [ "off" "on1" "on2" "on3" ];
input_select.heater_state_memory.options = [ "off" "on1" "on2" "on3" ]; #input_select.heater_state_memory.options = [ "off" "on1" "on2" "on3" ];
automation = [ automation = [
@ -153,26 +153,26 @@ in {
option = "outside"; option = "outside";
}; };
} }
{ #{
service = "input_select.select_option"; # service = "input_select.select_option";
data_template = { # data_template = {
entity_id = "input_select.heater_state_memory"; # entity_id = "input_select.heater_state_memory";
option = '' # option = ''
{% if not is_state("input_select.heater_state", "off") %} # {% if not is_state("input_select.heater_state", "off") %}
{{ states('input_select.heater_state') }} # {{ states('input_select.heater_state') }}
{%- else -%} # {%- else -%}
{{ states('input_select.heater_state_memory') }} # {{ states('input_select.heater_state_memory') }}
{%- endif %} # {%- endif %}
''; # '';
}; # };
} #}
{ #{
service = "input_select.select_option"; # service = "input_select.select_option";
data = { # data = {
entity_id = "input_select.heater_state"; # entity_id = "input_select.heater_state";
option = "off"; # option = "off";
}; # };
} #}
]; ];
} }
@ -206,13 +206,13 @@ in {
option = "default"; option = "default";
}; };
} }
{ #{
service = "input_select.select_option"; # service = "input_select.select_option";
data_template = { # data_template = {
entity_id = "input_select.heater_state"; # entity_id = "input_select.heater_state";
option = "{{ states('input_select.heater_state_memory') }}"; # option = "{{ states('input_select.heater_state_memory') }}";
}; # };
} #}
]; ];
} }
@ -233,7 +233,7 @@ in {
alias = "windows state = up in the morning"; alias = "windows state = up in the morning";
trigger = [{ trigger = [{
platform = "time"; platform = "time";
at = "09:00:00"; at = "08:30:00";
}]; }];
action = [{ action = [{
service = "input_boolean.turn_on"; service = "input_boolean.turn_on";
@ -265,29 +265,29 @@ in {
} }
# heater # heater
{ #{
alias = "heater state = on1 in the morning"; # alias = "heater state = on1 in the morning";
trigger = [{ # trigger = [{
platform = "time"; # platform = "time";
at = "09:00:00"; # at = "09:00:00";
}]; # }];
action = [ # action = [
{ # {
service = "input_select.select_option"; # service = "input_select.select_option";
data = { # data = {
entity_id = "input_select.heater_state"; # entity_id = "input_select.heater_state";
option = "on1"; # option = "on1";
}; # };
} # }
{ # {
service = "input_select.select_option"; # service = "input_select.select_option";
data = { # data = {
entity_id = "input_select.heater_state_memory"; # entity_id = "input_select.heater_state_memory";
option = "on1"; # option = "on1";
}; # };
} # }
]; # ];
} #}
#{ #{
# alias = "heater state = on2 in the early evening"; # alias = "heater state = on2 in the early evening";
# trigger = [{ # trigger = [{
@ -311,47 +311,47 @@ in {
# } # }
# ]; # ];
#} #}
{ #{
alias = "heater state = off in the evening"; # alias = "heater state = off in the evening";
trigger = [{ # trigger = [{
platform = "time"; # platform = "time";
at = "23:30:00"; # at = "23:30:00";
}]; # }];
action = [ # action = [
{ # {
service = "input_select.select_option"; # service = "input_select.select_option";
data = { # data = {
entity_id = "input_select.heater_state"; # entity_id = "input_select.heater_state";
option = "off"; # option = "off";
}; # };
} # }
{ # {
service = "input_select.select_option"; # service = "input_select.select_option";
data = { # data = {
entity_id = "input_select.heater_state_memory"; # entity_id = "input_select.heater_state_memory";
option = "off"; # option = "off";
}; # };
} # }
]; # ];
} #}
{ #{
alias = "handle heater state"; # alias = "handle heater state";
trigger = [ # trigger = [
{ # {
platform = "time_pattern"; # platform = "time_pattern";
minutes = "/10"; # every 5 minutes # minutes = "/10"; # every 5 minutes
} # }
{ # {
platform = "state"; # platform = "state";
entity_id = "input_select.heater_state"; # entity_id = "input_select.heater_state";
} # }
]; # ];
action = [{ # action = [{
service = "script.turn_on"; # service = "script.turn_on";
data_template.entity_id = # data_template.entity_id =
"script.heater_{{ states('input_select.heater_state') }}"; # "script.heater_{{ states('input_select.heater_state') }}";
}]; # }];
} #}
]; ];
group = let group = let
@ -441,50 +441,50 @@ in {
}; };
in { in {
heater_off = { #heater_off = {
sequence = [ # sequence = [
(heater_on "heater1" 5) # office # (heater_on "heater1" 5) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater2" 5) # office # (heater_on "heater2" 5) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater3" 5) # bed room # (heater_on "heater3" 5) # bed room
{ delay = delay; } # { delay = delay; }
(heater_on "heater4" 5) # storage room # (heater_on "heater4" 5) # storage room
]; # ];
}; #};
heater_on1 = { #heater_on1 = {
sequence = [ # sequence = [
(heater_on "heater1" hot) # office # (heater_on "heater1" hot) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater2" hot) # office # (heater_on "heater2" hot) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater3" cold) # bed room # (heater_on "heater3" cold) # bed room
{ delay = delay; } # { delay = delay; }
(heater_on "heater4" cold) # storage room # (heater_on "heater4" cold) # storage room
]; # ];
}; #};
heater_on2 = { #heater_on2 = {
sequence = [ # sequence = [
(heater_on "heater1" hot) # office # (heater_on "heater1" hot) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater2" hot) # office # (heater_on "heater2" hot) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater3" hot) # bed room # (heater_on "heater3" hot) # bed room
{ delay = delay; } # { delay = delay; }
(heater_on "heater4" cold) # storage room # (heater_on "heater4" cold) # storage room
]; # ];
}; #};
heater_on3 = { #heater_on3 = {
sequence = [ # sequence = [
(heater_on "heater1" cold) # office # (heater_on "heater1" cold) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater2" cold) # office # (heater_on "heater2" cold) # office
{ delay = delay; } # { delay = delay; }
(heater_on "heater3" hot) # bed room # (heater_on "heater3" hot) # bed room
{ delay = delay; } # { delay = delay; }
(heater_on "heater4" cold) # storage room # (heater_on "heater4" cold) # storage room
]; # ];
}; #};
fyrtur_up = { fyrtur_up = {
sequence = [ sequence = [