{"id":4917,"date":"2023-09-01T19:51:17","date_gmt":"2023-09-01T17:51:17","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=4917"},"modified":"2026-01-02T17:01:02","modified_gmt":"2026-01-02T15:01:02","slug":"je-pilote-les-relais-du-fil-pilote-de-mon-chauffage-avec-des-input_select-de-home-assistant","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/de\/je-pilote-les-relais-du-fil-pilote-de-mon-chauffage-avec-des-input_select-de-home-assistant","title":{"rendered":"Ich steuere die Pilotkabelrelais meiner Heizung mit input_select von Home Assistant"},"content":{"rendered":"<p>&nbsp;<\/p>\r\n<p><span style=\"color: initial; font-size: revert;\">Wie ich erl\u00e4utert habe in:<\/span><\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/de\/commander-chauffage-fil-pilote-avec-sonoff-4ch-pro-r2-multi-zones\/\" target=\"_blank\" rel=\"noopener\">Bestellen Sie Ihre Heizung mit einem Sonoff 4CH Pro R2 in mehreren Zonen<\/a><\/li>\r\n<\/ul>\r\n<p>Ich steuere meine Heizung \u00fcber zwei Zonen mit Pilotdr\u00e4hten. Im Rahmen der Umstellung von Jeedom auf Home Assistant muss ich diese Relais daher mit Home Assistant steuern k\u00f6nnen.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/filpiloteprincipe.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-40\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/filpiloteprincipe.jpg\" alt=\"filpiloteprincipe\" width=\"294\" height=\"248\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/filpiloteprincipe.jpg 597w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/filpiloteprincipe-300x253.jpg 300w\" sizes=\"auto, (max-width: 294px) 100vw, 294px\" \/><\/a><!--more--><\/p>\r\n<p>Derzeit wird der Sonoff 4CH Pro von ESP Easy gesteuert, ich werde ihn bald auf ESP Home umstellen, aber derzeit erm\u00f6glicht ESP Easy die Schnittstelle mit Jeedom UND Home Assistant \u00fcber MQTT.<\/p>\r\n<p>F\u00fcr die Konfiguration beziehe ich mich auf diesen Retex:<\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/de\/migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha\/\" target=\"_blank\" rel=\"noopener\">Jeedom-Migration zu Home Assistant, ESP-Link unter ESP-Easy zu HA<\/a><\/li>\r\n<\/ul>\r\n<h3>Ich steuere Relais \u00fcber MQTT<\/h3>\r\n<p>Wie in der <a href=\"https:\/\/www.sigalou-domotique.fr\/de\/migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha\/\" target=\"_blank\" rel=\"noopener\">Retex oben<\/a>, Es ist notwendig, die Entit\u00e4ten zu konfigurieren, die es erm\u00f6glichen, Relais in Home Assistant wiederherzustellen, dies geschieht in der Datei mqtt.yaml<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">- name: \"Relais 1 Heizung\" einzigartig_id: switch.heizung.relais1 command_topic: \"Heizung\/gpio\/12\" state_topic: \"Heizung\/Relais1\/Relais1\" payload_on: \"1\" payload_off: \"0\" retain: true device_class: outlet device: name: \"Heizung\" Identifikatoren: \"Heizung\" - name: \"Relais 2 Heizung\" einzigartig_id: switch.heizung.relais2 command_topic: \"Heizung\/gpio\/5\" state_topic: \"Heizung\/Relais2\/Relais2\" payload_on: \"1\" payload_off: \"0\" retain: true device_class: outlet device: name: \"Heizung\" Identifikatoren: \"Heizung\" - name: \"Relais 3 Heizung\" einzigartig_id: switch.heizung.relais3 command_topic: \"Heizung\/gpio\/4\" state_topic: \"Heizung\/Relais3\/Relais3\" payload_on: \"1\" payload_off: \"0\" retain: true device_class: outlet device: name: \"Heizung\" Identifikatoren: \"Heizung\" - name: \"Relais 4 Heizung\" einzigartig_id: switch.heizung.relais4 command_topic: \"Heizung\/gpio\/15\" state_topic: \"Heizung\/Relais4\/Relais4\" payload_on: \"1\" payload_off: \"0\" retain: true device_class: outlet device: name: \"Heizung\" Identifikatoren: \"Heizung\" \r\n<\/pre>\r\n<p>In HA werden diese 4 Entit\u00e4ten leicht wiederhergestellt\u00a0<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4924\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage1.png\" alt=\"\" width=\"508\" height=\"231\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage1.png 508w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage1-300x136.png 300w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/a><\/p>\r\n<h3>Ich erstelle input_select<\/h3>\r\n<p>In der Datei configuration.yaml deklariere ich die beiden Entit\u00e4ten der Zonen und erlaube ihnen, vier m\u00f6gliche Zust\u00e4nde zu haben.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">input_select: Heizung_etage_mode: name: Heizung Bereich Etage - Optionsmodus: - \"Komfort\" - \"Eco\" - \"Ohne Gel\" - \"Off\" Icon: mdi:help-circle-outline Heizung_rdc_mode: name: Heizung Bereich Erdgeschoss - Optionsmodus: - \"Komfort\" - \"Eco\" - \"Ohne Gel\" - \"Off\" Icon: mdi:help-circle-outline<\/pre>\r\n<p>Dies f\u00fcgt mir die beiden Einheiten hinzu:<\/p>\r\n<ul>\r\n<li>input_select.Heizung_rdc_mode<\/li>\r\n<li>input_select.Heizung_etage_mode<\/li>\r\n<\/ul>\r\n<h3>Ich personalisiere input_select<\/h3>\r\n<p>Ich versuche immer, die Dasboard-Fliesen optisch ansprechend zu gestalten, daf\u00fcr scheint es unerl\u00e4sslich, Farbe und sch\u00f6ne Icons zu setzen, die den Zust\u00e4nden entsprechen.<\/p>\r\n<p>Die Personalisierung erfolgt durch Hinzuf\u00fcgen dieser Zeilen in customize.yaml<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">input_select.Heizung_etage_mode: Templates: Icon: &gt; if (state == 'Komfort') return 'mdi:fire'; if (state == 'Eco') return 'mdi:leaf'; if (state == 'Ohne Gel') return 'mdi:snowflake-thermometer'; if (state == 'Off') return 'mdi:power'; return 'mdi:help-circle-outline'; icon_color: &gt; if (state == 'Komfort') return 'yellow'; if (state == 'Eco') return 'green'; if (state == 'Ohne Gel') return '#2196f3'; if (state == 'Off') return 'red'; input_select.Heizung_rdc_mode: Templates: Icon: &gt; if (state == 'Komfort') return 'mdi:fire'; if (state == 'Eco') return 'mdi:leaf'; if (state == 'Ohne Gel') return 'mdi:snowflake-thermometer'; if (state == 'Off') return 'mdi:power'; return 'mdi:help-circle-outline'; icon_color: &gt; if (state == 'Komfort') return 'yellow'; if (state == 'Eco') return 'green'; if (state == 'Ohne Gel') return '#2196f3'; if (state == 'Off') return 'red';    <\/pre>\r\n<h3>Ich steuere die Relais von den input_select<\/h3>\r\n<p>Die Zuordnung der Zonen (Etage und Chaussee) muss im Home Assistant erfolgen, die Auswahl der Relais zur Steuerung des Zonenmodus muss f\u00fcr den Nutzer transparent sein.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4927\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage2.png\" alt=\"\" width=\"728\" height=\"281\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage2.png 728w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage2-600x232.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage2-300x116.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a><\/p>\r\n<p>Zu diesem Zweck wird eine Automatisierung durch eine Status\u00e4nderung von input_select.chauffage_rdc_mode und eine weitere durch input_select.chauffage_etage_mode ausgel\u00f6st.<\/p>\r\n<p>Durch diese Automatisierung wird der Status der Relais ge\u00e4ndert, um die Reihenfolge zu senden, die der Kodierung des Pilotfadens entspricht. Dies wird erkl\u00e4rt <a href=\"https:\/\/www.sigalou-domotique.fr\/de\/commander-chauffage-fil-pilote-avec-sonoff-4ch-pro-r2-multi-zones\/#scenarii\" target=\"_blank\" rel=\"noopener\">hier<\/a>.<\/p>\r\n<h4>Automatisierung Steuerung Heizung Fahrwerk<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">alias: Steuerung Heizung Fahrwerk Beschreibung: \"\" Trigger: - platform: state entity_id: - input_select.Heizung_rdc_mode Bedingung: [] Ma\u00dfnahme: - if: - Bedingung: state entity_id: input_select.heizung_rdc_mode state: Komfort Then: - Dienststelle: switch.turn_off data: {} entity_id: - switch.heizung_relais_3_heizung - switch.heizung_relais_4_heizung - stop: \"\" - if: - Bedingung: state entity_id: input_select.heizung_rdc_mode state: Eco then: - Dienststelle: switch.turn_on data: {} entity_id: - switch.heizung_relais_3_heizung - switch.heizung_relais_4_heizung - stop: \"\" - if: - Bedingung: state entity_id: input_select.heizung_rdc_mode state: Au\u00dfer Gel then: - Dienststelle: switch.turn_off data: {} entity_id: - switch.heizung_relais_4_heizung - service: switch.turn_on data: {} entity_id: - switch.heizung_relais_3_heizung - stop: \"\" - if: - Bedingung: state entity_id: input_select.heizung_rdc_mode state: \"Off\" then: - Dienststelle: switch.turn_off data: {} entity_id: - switch.heizung_relais_3_heizung - service: switch.turn_on data: {} entity_id: - switch.heizung_relais_4_heizung - stop: \"\" Modus: Single\r\n<\/pre>\r\n<h4>Automatisierung Steuerung Heizung Etage<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">alias: Steuerung Heizung Etage Beschreibung: \"\" Trigger: - platform: state entity_id: - input_select.Heizung_etage_mode Bedingung: [] Ma\u00dfnahme: - if: - Bedingung: state entity_id: input_select.heizung_etage_mode state: Komfort Then: - Dienststelle: switch.turn_off data: {} entity_id: - switch.heizung_relais_2_heizung - switch.heizung_relais_1_heizung - stop: \"\" - if: - Bedingung: state entity_id: input_select.heizung_etage_mode state: Eco then: - Dienststelle: switch.turn_on data: {} entity_id: - switch.heizung_relais_2_heizung - switch.heizung_relais_1_heizung - stop: \"\" - if: - Bedingung: state entity_id: input_select.heizung_etage_mode state: Au\u00dfer Gel then: - Dienststelle: switch.turn_off data: {} entity_id: - switch.heizung_relais_2_heizung - service: switch.turn_on data: {} entity_id: - switch.heizung_relais_1_heizung - stop: \"\" - if: - Bedingung: state entity_id: input_select.heizung_etage_mode state: \"Off\" then: - Dienststelle: switch.turn_off data: {} entity_id: - switch.heizung_relais_1_heizung - service: switch.turn_on data: {} entity_id: - switch.heizung_relais_2_heizung - stop: \"\" Modus: Single<\/pre>\r\n<h3>Ich mache eine sch\u00f6ne Karte f\u00fcr das Dashboard<\/h3>\r\n<p>Hier ist das Ergebnis dessen, was ich mir als Karte w\u00fcnsche:<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4930\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage3.png\" alt=\"\" width=\"506\" height=\"270\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage3.png 506w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage3-300x160.png 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/a><\/p>\r\n<p>An diesem Punkt wei\u00df ich nicht, ob ich die Dropdown-Liste oder die Schaltfl\u00e4chen \/ Selektoren halten werde, beide funktionieren.<\/p>\r\n<h4>Kartencode f\u00fcr den Bereich Erdgeschoss\u00a0<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">Typ: custom:stack-in-card mode: vertikale Karten: - Typ: custom:auto-entities show_empty: false card: Typ: custom:mushroom-chips-card view_layout: grid-area: Chips Alignment: center card_param: chips filter: Template: &gt; {% set ns = namespace(select=[],entity=\"input_select.chauffage_rdc_mode\") %} {% for opt in state_attr(ns.entity, 'options') %} {% set icon = iif(opt== 'Komfort', 'mdi:fire', icon) %} {% set icon_color_select = iif(opt== 'Komfort', 'yellow', icon_color_select) %} {% set icon = iif(opt== 'Off', 'mdi:power', icon) %} {% set icon_color_select = iif(opt== 'Off', 'red', icon_color_select) %} {% set icon = iif(opt== 'Eco', 'mdi:leaf', icon) %} {% set icon_color_select = iif(opt== 'Eco', 'green', icon_color_select) %} {% set icon = iif(opt== 'Ohne Gel', 'mdi:snowflake-thermometer', icon) %} {% set icon_color_select = iif(opt== 'Ohne Gel', 'blue', icon_color_select) %} {% set ns.select = ns.select + [ { \"Typ\": \"template\", \"icon\": icon, \"entity\": ns.entity, \"icon_color\": '{{ iif(is_state(\"' ~ ns.entity ~ '\", \"' ~ opt ~ '\"), \"' ~ icon_color_select ~ '\", \"disabled\") }}', \"tap_action\": { \"Aktion\": \"Call-Service\", \"Service\": \"input_select.select_option\", \"service_data\": { \"entity_id\": ns.entity, \"Option\": opt } }, \"card_mod\": { \"Stil\": 'ha-card { {% if is_state( \"' ~ ns.entity ~ '\" , \"' ~ opt ~ '\" ) %} --chip-background: rgba(var(--rgb-grey), 0.1); {% else %} --chip-background: rgba(var(--mush-rgb-state-entity), 0.3); {% endif %} }' } } ] %} {% endfor %} {{ ns.select }} - Typ: entities entities: - entity: input_select.Heizung_rdc_mode\r\n<\/pre>\r\n<h4>Kartencode f\u00fcr die Zone \u201eEtage\u201c<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">Typ: custom:stack-in-card mode: vertikale Karten: - Typ: custom:auto-entities show_empty: false card: Typ: custom:mushroom-chips-card view_layout: grid-area: Chips Alignment: center card_param: chips filter: Template: &gt; {% set ns = namespace(select=[],entity=\"input_select.chauffage_etage_mode\") %} {% for opt in state_attr(ns.entity, 'options') %} {% set icon = iif(opt== 'Komfort', 'mdi:fire', icon) %} {% set icon_color_select = iif(opt== 'Komfort', 'yellow', icon_color_select) %} {% set icon = iif(opt== 'Off', 'mdi:power', icon) %} {% set icon_color_select = iif(opt== 'Off', 'red', icon_color_select) %} {% set icon = iif(opt== 'Eco', 'mdi:leaf', icon) %} {% set icon_color_select = iif(opt== 'Eco', 'green', icon_color_select) %} {% set icon = iif(opt== 'Ohne Gel', 'mdi:snowflake-thermometer', icon) %} {% set icon_color_select = iif(opt== 'Ohne Gel', 'blue', icon_color_select) %} {% set ns.select = ns.select + [ { \"Typ\": \"template\", \"icon\": icon, \"entity\": ns.entity, \"icon_color\": '{{ iif(is_state(\"' ~ ns.entity ~ '\", \"' ~ opt ~ '\"), \"' ~ icon_color_select ~ '\", \"disabled\") }}', \"tap_action\": { \"Aktion\": \"Call-Service\", \"Service\": \"input_select.select_option\", \"service_data\": { \"entity_id\": ns.entity, \"Option\": opt } }, \"card_mod\": { \"Stil\": 'ha-card { {% if is_state( \"' ~ ns.entity ~ '\" , \"' ~ opt ~ '\" ) %} --chip-background: rgba(var(--rgb-grey), 0.1); {% else %} --chip-background: rgba(var(--mush-rgb-state-entity), 0.3); {% endif %} }' } } ] %} {% endfor %} {{ ns.select }} - Typ: entities entities: - entity: input_select.Heizung_etage_mode\r\n<\/pre>\r\n<h3>Schlussfolgerung<\/h3>\r\n<p>Hier schlie\u00dfe ich einen wichtigen Schritt bei der Integration meiner Heizung in den Home Assistant ab. Ich werde mich nun mit der Steuerung dieser Heizung auf der Grundlage der anwesenden oder nicht anwesenden Personen, der Stunden, Tage und Abwesenheitszeiten (\u2026-Ferien) befassen.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4918\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/09\/chauffage.gif\" alt=\"\" width=\"502\" height=\"244\" \/><\/a><\/p>\r\n<p>&nbsp;<\/p>\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>&nbsp; Comme je l&rsquo;ai expliqu\u00e9 dans : Commander son chauffage avec un Sonoff 4CH Pro R2 en multi-zones Je pilote mon chauffage sur deux zones gr\u00e2ce \u00e0 des fils pilotes. Dans le cadre de la bascule de Jeedom vers Home Assistant, il faut donc que j&rsquo;arrive \u00e0 piloter ces relais avec Home Assistant.<\/p>","protected":false},"author":1,"featured_media":4918,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,166],"tags":[85,81],"class_list":["post-4917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-home-assistant","category-retex","tag-chauffage","tag-developpement"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/4917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/comments?post=4917"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/4917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media\/4918"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media?parent=4917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/categories?post=4917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/tags?post=4917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}