{"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\/zh\/je-pilote-les-relais-du-fil-pilote-de-mon-chauffage-avec-des-input_select-de-home-assistant","title":{"rendered":"\u6211\u901a\u8fc7 Home Assistant \u7684 input_select \u63a7\u5236\u52a0\u70ed\u5bfc\u7ebf\u7684\u7ee7\u7535\u5668"},"content":{"rendered":"<p>&nbsp;<\/p>\r\n<p><span style=\"color: initial; font-size: revert;\">\u6b63\u5982\u6211\u89e3\u91ca\u7684\u90a3\u6837\uff1a<\/span><\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/zh\/commander-chauffage-fil-pilote-avec-sonoff-4ch-pro-r2-multi-zones\/\" target=\"_blank\" rel=\"noopener\">\u5728\u591a\u4e2a\u533a\u57df\u8ba2\u8d2dSonoff 4CH Pro R2\u52a0\u70ed<\/a><\/li>\r\n<\/ul>\r\n<p>\u7531\u4e8e\u98de\u884c\u5458\u7684\u7535\u7ebf\uff0c\u6211\u63a7\u5236\u4e86\u4e24\u4e2a\u533a\u57df\u7684\u4f9b\u6696\u3002 \u4f5c\u4e3a\u4ece Jeedom \u5230 Home Assistant \u8f6c\u6362\u7684\u4e00\u90e8\u5206\uff0c\u6211\u5fc5\u987b\u4f7f\u7528 Home Assistant \u7ba1\u7406\u8fd9\u4e9b\u7ee7\u7535\u5668\u3002<\/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 \u6cd5\u7f57\u7279 \u666e\u6797\u897f\u6bd4\" 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>\u76ee\u524d\uff0cSonoff 4CH Pro\u7531ESP Easy\u9a71\u52a8\uff0c\u6211\u5c06\u5f88\u5feb\u5c06\u5176\u5207\u6362\u5230ESP Home\uff0c\u4f46\u73b0\u5728ESP Easy\u5141\u8bb8\u60a8\u901a\u8fc7MQTT\u4e0eJeedom ET Home Assistant\u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\r\n<p>\u5bf9\u4e8e\u914d\u7f6e\uff0c\u6211\u53c2\u8003\u6b64 Retex \uff1a<\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/zh\/migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha\/\" target=\"_blank\" rel=\"noopener\">Jeedom\u8fc1\u79fb\u5230\u5bb6\u5ead\u52a9\u7406\uff0cESP\u94fe\u63a5\u4e0bESP-Easy\u5230HA<\/a><\/li>\r\n<\/ul>\r\n<h3>\u6211\u901a\u8fc7MQTT\u9a71\u52a8\u7ee7\u7535\u5668<\/h3>\r\n<p>\u6b63\u5982\u5728\u300a <a href=\"https:\/\/www.sigalou-domotique.fr\/zh\/migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha\/\" target=\"_blank\" rel=\"noopener\">\u4e0a\u9762\u7684RETEX<\/a>, \u6709\u5fc5\u8981\u914d\u7f6e\u5141\u8bb8\u5728Home Assistant\u4e2d\u6062\u590d\u4e2d\u7ee7\u7684\u5b9e\u4f53\uff0c\u8fd9\u662f\u5728mqtt.yaml\u6587\u4ef6\u4e2d\u5b8c\u6210\u7684\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">\u59d3\u540d\uff1a \"Relay 1 Heating\" \u552f\u4e00 _id\uff1a switch.heating.relais1 command_topic \uff1a \"heating\/gpio\/12\" state_topic\uff1a \"Heating\/Relay1\/Relay1\" payload_on\uff1a \"1\"\u6709\u6548\u8f7d\u8377_off\uff1a \"0\"\u4fdd\u7559\uff1a true device_class \uff1a Outlet \u8bbe\u5907 \uff1a \u59d3\u540d\uff1a \u300e\u52a0\u70ed\u300f\u6807\u8bc6\u7b26\uff1a \u300e\u70ed\u300f - \u540d\u79f0\uff1a \"Relay 2 Heating\" \u552f\u4e00 _id\uff1a switch.heating.relais2 command_topic \uff1a \"heating\/gpio\/5\" state_topic\uff1a \"Heating\/Relay2\/Relay2\" payload_on\uff1a \"1\"\u6709\u6548\u8f7d\u8377_off\uff1a \"0\"\u4fdd\u7559\uff1a true device_class \uff1a Outlet \u8bbe\u5907 \uff1a \u59d3\u540d\uff1a \u300e\u52a0\u70ed\u300f\u6807\u8bc6\u7b26\uff1a \u300e\u70ed\u300f - \u540d\u79f0\uff1a \"Relay 3 Heating\" \u72ec\u7279 _id\uff1a switch.heating.relais3 command_topic \uff1a \"heating\/gpio\/4\" state_topic\uff1a \"Heating\/Relay3\/Relay3\" payload_on\uff1a \"1\"\u6709\u6548\u8f7d\u8377_off\uff1a \"0\"\u4fdd\u7559\uff1a true device_class \uff1a Outlet \u8bbe\u5907 \uff1a \u59d3\u540d\uff1a \u300e\u52a0\u70ed\u300f\u6807\u8bc6\u7b26\uff1a \u300e\u70ed\u300f - \u540d\u79f0\uff1a \"Relay 4 Heating\" \u72ec\u7279 _id\uff1a switch.heating.relais4 command_topic \uff1a \"heating\/gpio\/15\" state_topic\uff1a \"Heating\/Relay4\/Relay4\" payload_on\uff1a \"1\"\u6709\u6548\u8f7d\u8377_off\uff1a \"0\"\u4fdd\u7559\uff1a true device_class \uff1a Outlet \u8bbe\u5907 \uff1a \u59d3\u540d\uff1a \u300e\u52a0\u70ed\u300f\u6807\u8bc6\u7b26\uff1a \u300e\u70ed\u300f \r\n<\/pre>\r\n<p>\u5728HA\u4e2d\uff0c\u8fd94\u4e2a\u5b9e\u4f53\u5f88\u5bb9\u6613\u6062\u590d\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>\u521b\u5efa _select input<\/h3>\r\n<p>\u5728config.yaml\u6587\u4ef6\u4e2d\uff0c\u6211\u901a\u8fc7\u5141\u8bb8\u5b83\u4eec\u5177\u67094\u79cd\u53ef\u80fd\u7684\u72b6\u6001\u6765\u58f0\u660e\u533a\u57df\u7684\u4e24\u4e2a\u5b9e\u4f53\u3002<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">input_select \uff1a \u52a0\u70ed_etage_mode \uff1a \u59d3\u540d\uff1a \u52a0\u70ed\u533a\u5730\u677f - \u6a21\u5f0f\u9009\u9879\uff1a - \"\u8212\u9002\" - \"Eco\" - \"Out of Gel\" - \"Off\"\u56fe\u6807\uff1a MDI:help-circle-outline \u52a0\u70ed _rdc _mode\uff1a \u59d3\u540d\uff1a \u52a0\u70ed\u533a\u5730\u9762\u5730\u677f - \u6a21\u5f0f\u9009\u9879\uff1a - \"\u8212\u9002\" - \"Eco\" - \"Out of Gel\" - \"Off\"\u56fe\u6807\uff1a mdi:help-circle-outline<\/pre>\r\n<p>\u8fd9\u589e\u52a0\u4e86\u4e24\u4e2a\u5b9e\u4f53\uff1a<\/p>\r\n<ul>\r\n<li>input_select.heating_rdc_mode<\/li>\r\n<li>input_select.heating_etage_mode<\/li>\r\n<\/ul>\r\n<h3>\u81ea\u5b9a\u4e49 input_select<\/h3>\r\n<p>\u6211\u603b\u662f\u8bd5\u56fe\u5728\u89c6\u89c9\u4e0a\u53d6\u60a6dasboard\u7684\u74f7\u7816\uff0c\u4e3a\u6b64\uff0c\u653e\u7f6e\u989c\u8272\u5e76\u653e\u7f6e\u4e0e\u5404\u5dde\u76f8\u5bf9\u5e94\u7684\u7f8e\u4e3d\u56fe\u6807\u4f3c\u4e4e\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u3002<\/p>\r\n<p>\u81ea\u5b9a\u4e49\u662f\u901a\u8fc7\u5728 customize.yaml \u4e2d\u6dfb\u52a0\u8fd9\u4e9b\u884c\u6765\u5b9e\u73b0\u7684<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">input_select.heating_etage_mode \uff1a \u6a21\u677f \uff1a \u56fe\u6807 \uff1a \u5982\u679c(state == 'Comfort')\u8fd4\u56de 'mdi:fire'; \u5982\u679c(state == 'Eco')\u8fd4\u56de 'mdi:leaf'\uff1b \u5982\u679c(state == 'Hors Gel')\u8fd4\u56de 'mdi:snowflake-thermometer'\uff1b \u5982\u679c(state == 'Off')\u8fd4\u56de 'mdi:power'\uff1b \u8fd4\u56de 'mdi:help-circle-outline'\uff1b \u56fe\u6807_color \uff1a \u5982\u679c(state == 'Comfort')\u8fd4\u56de 'yellow'; \u5982\u679c(state == 'Eco')\u8fd4\u56de 'green'\uff1b if(state == 'Outside Gel')\u8fd4\u56de#2196f3'; \u5982\u679c(state == 'Off')\u8fd4\u56de 'red'; input_select.heating_rdc_mode \uff1a \u6a21\u677f \uff1a \u56fe\u6807 \uff1a \u5982\u679c(state == 'Comfort')\u8fd4\u56de 'mdi:fire'; \u5982\u679c(state == 'Eco')\u8fd4\u56de 'mdi:leaf'\uff1b \u5982\u679c(state == 'Hors Gel')\u8fd4\u56de 'mdi:snowflake-thermometer'\uff1b \u5982\u679c(state == 'Off')\u8fd4\u56de 'mdi:power'\uff1b \u8fd4\u56de 'mdi:help-circle-outline'\uff1b \u56fe\u6807_color \uff1a \u5982\u679c(state == 'Comfort')\u8fd4\u56de 'yellow'; \u5982\u679c(state == 'Eco')\u8fd4\u56de 'green'\uff1b if(state == 'Outside Gel')\u8fd4\u56de#2196f3'; \u5982\u679c(state == 'Off')\u8fd4\u56de 'red';    <\/pre>\r\n<h3>\u6211\u9a71\u52a8\u6765\u81ea input_select \u7684\u7ee7\u7535\u5668<\/h3>\r\n<p>\u533a\u57df\uff08\u9762\u79ef\u548c\u5730\u9762\uff09\u4e4b\u95f4\u7684\u5bf9\u5e94\u5fc5\u987b\u5728\u5bb6\u5ead\u52a9\u7406\u4e2d\u5b8c\u6210\uff0c\u63a7\u5236\u533a\u57df\u6a21\u5f0f\u7684\u7ee7\u7535\u5668\u7684\u9009\u62e9\u5fc5\u987b\u5bf9\u7528\u6237\u900f\u660e\u3002<\/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>\u4e3a\u6b64\uff0c\u7531 input_select.heating_rdc_mode \u72b6\u6001\u7684\u53d8\u5316\u89e6\u53d1\u81ea\u52a8\u5316\uff0c\u53e6\u4e00\u4e2a\u7531 input_select.heating_etage_mode \u89e6\u53d1\u3002<\/p>\r\n<p>\u8fd9\u79cd\u81ea\u52a8\u5316\u5c06\u6539\u53d8\u7ee7\u7535\u5668\u7684\u72b6\u6001\uff0c\u4ee5\u4fbf\u53d1\u9001\u5bf9\u5e94\u4e8e\u5f15\u7ebf\u7f16\u7801\u7684\u8ba2\u5355\u3002 \u5bf9\u6b64\u6709\u89e3\u91ca <a href=\"https:\/\/www.sigalou-domotique.fr\/zh\/commander-chauffage-fil-pilote-avec-sonoff-4ch-pro-r2-multi-zones\/#scenarii\" target=\"_blank\" rel=\"noopener\">\u5728\u8fd9\u91cc<\/a>.<\/p>\r\n<h4>\u81ea\u52a8 \u8bd5\u9a8c \u4f9b\u70ed \u5730\u9762 \u5730\u677f<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">\u5316\u540d \uff1a \u5f15\u822a\u4f9b\u6696\u5730\u9762\u697c\u5c42\u63cf\u8ff0\uff1a \u89e6\u53d1\u5668\uff1a \u5e73\u53f0\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_rdc_mode \u6761\u4ef6\uff1a [] \u884c\u52a8\uff1a \u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_rdc_mode \u72b6\u6001\uff1a \u90a3\u4e48\u8212\u9002\uff1a \u670d\u52a1\uff1a switch.turn _off \u6570\u636e\uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_3_heating - switch.heating_relais_4_heating - \u505c\u6b62\uff1a -\u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_rdc_mode \u72b6\u6001\uff1a \u751f\u6001\uff1a \u670d\u52a1\uff1a switch.turn_on \u6570\u636e \uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_3_heating - switch.heating_relais_4_heating - \u505c\u6b62\uff1a -\u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_rdc_mode \u72b6\u6001\uff1a \u4e0d\u5305\u62ecGel\uff1a \u670d\u52a1\uff1a switch.turn _off \u6570\u636e\uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_4_heating - \u670d\u52a1\uff1a switch.turn_on \u6570\u636e \uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_3_heating - \u505c\u6b62\uff1a -\u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_rdc_mode \u72b6\u6001\uff1a \u7136\u540e\u300e\u5173\u95ed\u300f\uff1a \u670d\u52a1\uff1a switch.turn _off \u6570\u636e\uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_3_heating - \u670d\u52a1\uff1a switch.turn_on \u6570\u636e \uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_4_heating - \u505c\u6b62\uff1a \u6a21\u5f0f\uff1a \u5355 \u4eba \u5355\r\n<\/pre>\r\n<h4>\u81ea\u52a8 \u8bd5\u9a8c \u4f9b\u70ed \u5730\u677f<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">\u5316\u540d \uff1a \u5f15\u822a\u4f9b\u6696\u5730\u677f\u63cf\u8ff0\uff1a \u89e6\u53d1\u5668\uff1a \u5e73\u53f0\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_etage_mode \u6761\u4ef6\uff1a [] \u884c\u52a8\uff1a \u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_etage _mode \u72b6\u6001\uff1a \u90a3\u4e48\u8212\u9002\uff1a \u670d\u52a1\uff1a switch.turn _off \u6570\u636e\uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_2_heating - switch.heating_relais_1_heating - \u505c\u6b62\uff1a -\u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_etage _mode \u72b6\u6001\uff1a \u751f\u6001\uff1a \u670d\u52a1\uff1a switch.turn_on \u6570\u636e \uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_2_heating - switch.heating_relais_1_heating - \u505c\u6b62\uff1a -\u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_etage _mode \u72b6\u6001\uff1a \u4e0d\u5305\u62ecGel\uff1a \u670d\u52a1\uff1a switch.turn _off \u6570\u636e\uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_2_heating - \u670d\u52a1\uff1a switch.turn_on \u6570\u636e \uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_1_heating - \u505c\u6b62\uff1a -\u5982\u679c\uff1a \u6761\u4ef6\uff1a \u56fd\u5bb6\u5b9e\u4f53_id\uff1a input_select.heating_etage _mode \u72b6\u6001\uff1a \u7136\u540e\u300e\u5173\u95ed\u300f\uff1a \u670d\u52a1\uff1a switch.turn _off \u6570\u636e\uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_1_heating - \u670d\u52a1\uff1a switch.turn_on \u6570\u636e \uff1a {} \u5b9e\u4f53 _id \uff1a switch.heating_relais_2_heating - \u505c\u6b62\uff1a \u6a21\u5f0f\uff1a \u5355 \u4eba \u5355<\/pre>\r\n<h3>\u6211\u4e3a\u4eea\u8868\u677f\u5236\u4f5c\u4e86\u4e00\u5f20\u6f02\u4eae\u7684\u5730\u56fe<\/h3>\r\n<p>\u4ee5\u4e0b\u662f\u6211\u60f3\u8981\u7684\u4e00\u5f20\u5361\u7247\u7684\u7ed3\u679c\uff1a<\/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>\u5728\u8fd9\u4e00\u70b9\u4e0a\uff0c\u6211\u4e0d\u77e5\u9053\u6211\u662f\u5426\u4f1a\u4fdd\u7559\u4e0b\u62c9\u5217\u8868\u6216\u6309\u94ae\/\u9009\u62e9\u5668\uff0c\u4e24\u8005\u90fd\u6709\u6548\u3002<\/p>\r\n<h4>\u4e00\u697c\u533a\u57df\u7684\u5730\u56fe\u4ee3\u7801\u00a0<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">\u7c7b\u578b \uff1a \u81ea\u5b9a\u4e49\uff1astack-in-card \u6a21\u5f0f \uff1a \u5782\u76f4\u5361\u7247\uff1a \u7c7b\u578b\uff1a Cust:auto-entities show _empty \uff1a \u5047\u5361 \uff1a \u7c7b\u578b \uff1a \u81ea\u5b9a\u4e49\uff1amushroom-chips-card view_layout\uff1a \u7f51\u683c\u533a\u57df\uff1a \u82af\u7247\u5bf9\u9f50\uff1a \u4e2d\u5fc3\u5361_param \uff1a \u82af\u7247\u6ee4\u6ce2\u5668 \uff1a Template: &gt; {% \u8bbe\u7f6e ns = namespace(select=[],entity=\"input_select.heating_rdc_mode\") %} {% \u9009\u62e9 state_attr(ns.entity, 'options') %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Comfort', 'mdi:fire', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Comfort', 'yellow', icon_color _select) %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Off', 'mdi:power', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Off', 'red', icon_color _select) %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Eco', 'mdi:leaf', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Eco', 'green', icon_color _select) %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Out of Gel', 'mdi:snowflake-thermometer', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Out of Gel', 'blue', icon_color _select) %} {% \u8bbe\u7f6e ns.select = ns.select + [{ \"type\"\uff09\uff1a \"\u6a21\u677f\"\uff0c\"icon\"\uff1a \u56fe\u6807\uff0c\u300e\u5b9e\u4f53\u300f\uff1a NS.entity\uff0c\"icon _color\"\uff1a {{ IIF\uff08is_state\uff08is _state(')' ~ ns.entity ~ ', \"'' ~ ~ opt ~ ''\", \"' ~ icon_color _select ~ ', \"disabled\"}, \"tap _action\"\uff1a \u300e\u884c\u52a8\u300f\uff1a \"\u547c\u53eb\u670d\u52a1\"\u3001\"\u670d\u52a1\"\uff1a \"input_select.select _option\"\uff0c\"_data service\"\uff1a { \"entity _id\" \uff1a NS.entity, \"option\"\uff1a \"card _mod\"\uff1a \u300e\u98ce\u683c\u300f\uff1a \u54c8\u5361 { {% if is _state(\" ~ ns.entity ~ '\", \"&gt;\" ~ opt ~ '\") %} --chip-background \uff1a RGBA\uff08var(-rgb-grey)\uff0c0.1\uff09; {% \u5176\u4ed6 \u5176\u5b83 %} --chip-background \uff1a RGBA\uff08var(-mush-rgb-state-entity)\uff0c0.3\uff09; {% Endif \u7684 %} } } } %} {% \u7ed3\u675f \u4e8e %} { ns.select } - \u7c7b\u578b\uff1a \u5b9e\u4f53\uff1a - \u5b9e\u4f53\uff1a input_select.heating_rdc_mode\r\n<\/pre>\r\n<h4>\u5730\u677f\u533a\u57df\u5730\u56fe\u4ee3\u7801<\/h4>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">\u7c7b\u578b \uff1a \u81ea\u5b9a\u4e49\uff1astack-in-card \u6a21\u5f0f \uff1a \u5782\u76f4\u5361\u7247\uff1a \u7c7b\u578b\uff1a Cust:auto-entities show _empty \uff1a \u5047\u5361 \uff1a \u7c7b\u578b \uff1a \u81ea\u5b9a\u4e49\uff1amushroom-chips-card view_layout\uff1a \u7f51\u683c\u533a\u57df\uff1a \u82af\u7247\u5bf9\u9f50\uff1a \u4e2d\u5fc3\u5361_param \uff1a \u82af\u7247\u6ee4\u6ce2\u5668 \uff1a Template: &gt; {% \u8bbe\u7f6e ns = namespace(select=[],entity=\"input_select.heating_etage _mode\") %} {% \u9009\u62e9 state_attr(ns.entity, 'options') %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Comfort', 'mdi:fire', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Comfort', 'yellow', icon_color _select) %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Off', 'mdi:power', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Off', 'red', icon_color _select) %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Eco', 'mdi:leaf', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Eco', 'green', icon_color _select) %} {% \u8bbe\u7f6e\u56fe\u6807 = iif(opt== 'Out of Gel', 'mdi:snowflake-thermometer', icon) %} {% \u8bbe\u7f6e icon_color _select = iif(opt== 'Out of Gel', 'blue', icon_color _select) %} {% \u8bbe\u7f6e ns.select = ns.select + [{ \"type\"\uff09\uff1a \"\u6a21\u677f\"\uff0c\"icon\"\uff1a \u56fe\u6807\uff0c\u300e\u5b9e\u4f53\u300f\uff1a NS.entity\uff0c\"icon _color\"\uff1a {{ IIF\uff08is_state\uff08is _state(')' ~ ns.entity ~ ', \"'' ~ ~ opt ~ ''\", \"' ~ icon_color _select ~ ', \"disabled\"}, \"tap _action\"\uff1a \u300e\u884c\u52a8\u300f\uff1a \"\u547c\u53eb\u670d\u52a1\"\u3001\"\u670d\u52a1\"\uff1a \"input_select.select _option\"\uff0c\"_data service\"\uff1a { \"entity _id\" \uff1a NS.entity, \"option\"\uff1a \"card _mod\"\uff1a \u300e\u98ce\u683c\u300f\uff1a \u54c8\u5361 { {% if is _state(\" ~ ns.entity ~ '\", \"&gt;\" ~ opt ~ '\") %} --chip-background \uff1a RGBA\uff08var(-rgb-grey)\uff0c0.1\uff09; {% \u5176\u4ed6 \u5176\u5b83 %} --chip-background \uff1a RGBA\uff08var(-mush-rgb-state-entity)\uff0c0.3\uff09; {% Endif \u7684 %} } } } %} {% \u7ed3\u675f \u4e8e %} { ns.select } - \u7c7b\u578b\uff1a \u5b9e\u4f53\uff1a - \u5b9e\u4f53\uff1a input_select.heating_etage_mode\r\n<\/pre>\r\n<h3>\u7ed3\u8bba \u7ed3\u8bba<\/h3>\r\n<p>\u6211\u5728\u8fd9\u91cc\u5b8c\u6210\u4e86\u6211\u4e0e\u5bb6\u5ead\u52a9\u7406\u7684\u52a0\u70ed\u6574\u5408\u7684\u91cd\u8981\u4e00\u6b65\u3002 \u6211\u73b0\u5728\u5c06\u6839\u636e\u8c01\u5728\u573a\uff0c\u5c0f\u65f6\uff0c\u5929\u548c\u7f3a\u52e4\u65f6\u95f4\uff08\u2026\u5047\u671f\uff09\u6765\u89e3\u51b3\u8fd9\u79cd\u52a0\u70ed\u7684\u63a7\u5236\u3002<\/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; \u6b63\u5982\u6211\u89e3\u91ca\u7684\u90a3\u6837\uff1a \u4f7f\u7528Sonoff 4CH Pro R2\u5728\u591a\u4e2a\u533a\u57df\u8ba2\u8d2d\u52a0\u70ed\uff0c\u6211\u63a7\u5236\u4e24\u4e2a\u533a\u57df\u7684\u52a0\u70ed\uff0c\u8fd9\u8981\u5f52\u529f\u4e8e\u98de\u884c\u5458\u7535\u7ebf\u3002 \u4f5c\u4e3a\u4ece Jeedom \u5230 Home Assistant \u8f6c\u6362\u7684\u4e00\u90e8\u5206\uff0c\u6211\u5fc5\u987b\u4f7f\u7528 Home Assistant \u7ba1\u7406\u8fd9\u4e9b\u7ee7\u7535\u5668\u3002<\/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\/zh\/wp-json\/wp\/v2\/posts\/4917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/comments?post=4917"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/posts\/4917\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/media\/4918"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/media?parent=4917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/categories?post=4917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/zh\/wp-json\/wp\/v2\/tags?post=4917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}