{"id":4377,"date":"2025-03-29T11:02:39","date_gmt":"2025-03-29T11:02:39","guid":{"rendered":"https:\/\/www.creatingsmarthome.com\/?p=4377"},"modified":"2025-03-29T11:02:41","modified_gmt":"2025-03-29T11:02:41","slug":"from-the-mind-of-mihail-fooling-temperature-controlled-devices-with-relays-and-esp32","status":"publish","type":"post","link":"https:\/\/www.creatingsmarthome.com\/index.php\/2025\/03\/29\/from-the-mind-of-mihail-fooling-temperature-controlled-devices-with-relays-and-esp32\/","title":{"rendered":"From the mind of Mihail &#8211; Fooling temperature controlled devices with relays and ESP32"},"content":{"rendered":"\n<p>In modern smart home automation there is often a need to integrate temperature-controlled devices that have no IOT capabilities at all. This article explores a creative approach using variable resistors and double pole double throw (DPDT) relays to inject switchable fake temperature readings into your system. By altering the sensor input, you can offset heating and cooling curves and even boost heating ahead of peak electricity hours\u2014all with components costing only a few euros.<br><br>In this example we will be fooling the temperature sensor for a J\u00e4spi Ecowatti hybrid electric heating system and gaining IoT control over the device that has none built in.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Understanding PT1000 and PT100 Sensors<\/h2>\n\n\n\n<p>PT1000 and PT100 sensors are among the most common temperature sensors used in industrial and domestic applications. Essentially, these sensors are resistors whose resistance value varies predictably with temperature. For instance, the PT100 sensor has a resistance of 100 ohms at 0\u00b0C and increases linearly with rising temperature, while the PT1000 operates on a similar principle with a baseline resistance of 1000 ohms. These sensors rely on active measurement circuitry to read the precise resistance values, converting them into a temperature reading. This active circuitry is the reason why a complete replacement\u2014rather than a simple bypass\u2014of the sensor with a fake resistance value is necessary when aiming to manipulate temperature readings.<\/p>\n\n\n\n<p>The resistance tables can easily be looked up online and most heating systems come with an installation manual that contains the appropriate table.<\/p>\n\n\n\n<p>Multi turn trimmer pots are a good component to provide the resistance values. You can search for them on ali express with the keyword: &#8220;multi turn trimmer pot&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"425\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8aa734a8c131053726f84bd2ac5f821a_MD5-1024x425.png\" alt=\"\" class=\"wp-image-4379\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8aa734a8c131053726f84bd2ac5f821a_MD5-1024x425.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8aa734a8c131053726f84bd2ac5f821a_MD5-300x125.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8aa734a8c131053726f84bd2ac5f821a_MD5-768x319.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8aa734a8c131053726f84bd2ac5f821a_MD5.png 1272w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The Role of DPDT Relays in Temperature Control<\/h2>\n\n\n\n<p>DPDT relays are ideal for this application because they can switch between two circuits, allowing you to completely replace the real temperature sensor with a circuit containing a variable resistor. When the relay is activated, it disconnects the original sensor and connects the fake resistor, providing a controllable, switchable resistance value that mimics a specific temperature. By using multiple DPDT relays in a chain, you can switch between several predefined resistance values, each corresponding to different temperature readings. In my schematic example, the system uses three relays to manage the real sensor value plus three additional fake values.<\/p>\n\n\n\n<p>You can search for the correct relay type on ali express using the search keyword of &#8220;5v dpdt relay&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"428\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/fe76bad992c2ad3b4fc39e827e160ba8_MD5-1024x428.png\" alt=\"\" class=\"wp-image-4380\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/fe76bad992c2ad3b4fc39e827e160ba8_MD5-1024x428.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/fe76bad992c2ad3b4fc39e827e160ba8_MD5-300x126.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/fe76bad992c2ad3b4fc39e827e160ba8_MD5-768x321.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/fe76bad992c2ad3b4fc39e827e160ba8_MD5.png 1286w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Chaining Relays for Multiple Temperature Values<\/h2>\n\n\n\n<p>Chaining the relays allows for a flexible system capable of selecting from multiple preset temperature values. In the example provided, one relay ensures that the real sensor is normally connected, while the other three relay circuits can be toggled to simulate various temperature readings. This setup is controlled via an ESP32 microcontroller integrated with Home Assistant through ESPHome. By configuring the microcontroller to manage the relay states, the system can dynamically select which temperature value to feed into the heating control circuit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"631\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5-1024x631.png\" alt=\"\" class=\"wp-image-4381\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5-1024x631.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5-300x185.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5-768x473.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5-1536x947.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5-1920x1184.png 1920w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5.png 2018w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Creating Temperature Offsets for Heating and Cooling<\/h2>\n\n\n\n<p>Most heating systems operate on a heating curve that calculates the required heat based on an outdoor temperature reading. By substituting this reading with a fake value, you can effectively create an offset. For example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Offsetting for Comfort:<\/strong> Feeding a slightly higher or lower temperature than the actual one adjusts the system&#8217;s response, ensuring optimal indoor climate control without stressing the heating system.<\/li>\n\n\n\n<li><strong>Effective Shut-Off:<\/strong> Providing a fake reading of +20\u00b0C can essentially shut off the heating system by tricking it into thinking no additional heating is necessary. This is more effective than the built in relay operated away from home switch that lowers the heating by around 10\u00b0C.<\/li>\n\n\n\n<li><strong>Boosting Heating:<\/strong> Conversely, feeding a cold temperature like -20\u00b0C can trigger a boost in heating, pre-emptively warming the home before expensive electricity price hours hit, thereby reducing the temperature drops.<\/li>\n<\/ul>\n\n\n\n<p>This approach is not only efficient but also less stressful on the system components compared to turning the heating system off entirely.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Cost-Effective and Scalable Implementation<\/h2>\n\n\n\n<p>One of the significant advantages of this method is its low cost. The required components\u2014relays and variable resistors\u2014are inexpensive, often costing just a few euros each. This makes the solution highly scalable, allowing you to implement multiple fake temperature readings without a significant financial investment.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Failsafe Operation Considerations<\/h2>\n\n\n\n<p>Safety and reliability are paramount, especially when manipulating critical system inputs like temperature sensors. In the proposed design, failsafe operation is achieved by leveraging the normally open (NO) and normally closed (NC) contacts of the DPDT relays. The wiring is arranged so that, in the event of a power failure or system malfunction, the relay defaults to connecting the real temperature sensor. This ensures that the heating system always receives accurate temperature data, preventing unintended operation or system damage during a failure.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Schematic Overview<\/h2>\n\n\n\n<p>The schematic of this system is designed to clearly delineate the connections between the temperature sensor, variable resistors, DPDT relays, and the ESP32 microcontroller. Key aspects include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Sensor Integration:<\/strong> The real sensor is connected through a normally closed relay contact, ensuring its default operation.<\/li>\n\n\n\n<li><strong>Relay Switching:<\/strong> Three additional relay circuits provide different resistance values from the variable resistors, each corresponding to a different fake temperature.<\/li>\n\n\n\n<li><strong>Control Logic:<\/strong> The ESP32, programmed via ESPHome, controls the relay states based on inputs from Home Assistant. This modular design enables flexible switching between real and fake temperature values, tailored to the needs of the heating curve adjustments.<br>The relays require power (5V), ground and signal. The pinout for the relays is relatively standard.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"448\" height=\"418\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/6316ca4cd0084da3b34dbee9d649409e_MD5-1.png\" alt=\"\" class=\"wp-image-4382\" style=\"width:545px;height:auto\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/6316ca4cd0084da3b34dbee9d649409e_MD5-1.png 448w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/6316ca4cd0084da3b34dbee9d649409e_MD5-1-300x280.png 300w\" sizes=\"auto, (max-width: 448px) 100vw, 448px\" \/><\/figure>\n<\/div>\n\n\n<p>The markings on the relay are easy to understand when you know what they mean.<br>NO &#8211; normally open<br>NC &#8211; normally closed<br>COM &#8211; common<br>IN &#8211; Signal for the relay to switch<br>VCC &#8211; input voltage of 5V<br>GND &#8211; Ground<br><br>In the default state Common is connected to normally closed and once the relay is energized it is switched to connect to normally open.<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"478\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-1024x478.png\" alt=\"\" class=\"wp-image-4383\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-1024x478.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-300x140.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-768x359.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-1536x718.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-2048x957.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/83642f705ebf4994cfcea158df2b9456_MD5-1920x897.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"746\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-1024x746.png\" alt=\"\" class=\"wp-image-4384\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-1024x746.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-300x219.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-768x559.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-1536x1119.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-2048x1492.png 2048w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/a62c2e4bddccc58a1c5fcb0869f1b4ef_MD5-1920x1399.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This is also a nice project to practice those soldering skills.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"733\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5-1024x733.png\" alt=\"\" class=\"wp-image-4385\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5-1024x733.png 1024w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5-300x215.png 300w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5-768x549.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5-1536x1099.png 1536w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5-1920x1374.png 1920w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/c3b147a6037fd830ddc5fde39c6eb30a_MD5.png 1968w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">ESP32 Source Code Details<\/h2>\n\n\n\n<p>The ESP32 microcontroller acts as the brain of the system. The source code, written for ESPHome, manages the relay operations with precision. Key elements of the code include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Relay Control:<\/strong> Logic to switch each DPDT relay based on predetermined conditions or commands received from Home Assistant.<\/li>\n\n\n\n<li><strong>Integration with Home Assistant:<\/strong> The code includes configurations that allow the ESP32 to communicate with Home Assistant, enabling remote control and monitoring of the system.<\/li>\n\n\n\n<li><strong>Failsafe Measures:<\/strong> The code is designed to ensure that, in the event of a system fault, the relays revert to their default states, thereby reconnecting the real temperature sensor to maintain system safety.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>esphome:\n  name: pannuhuone-outside-temp\n  friendly_name: pannuhuone-outside-temp\n\nesp32:\n  board: esp32dev\n  framework:\n    type: arduino\n\n# Enable logging\nlogger:\n\n# Enable Home Assistant API\napi:\n  encryption:\n    key: \"Your encryption key\"\n\nota:\n  - platform: esphome\n    password: \"PASSWORD\"\n\nwifi:\n  ssid: !secret wifi_ssid\n  password: !secret wifi_password\n\n  # Enable fallback hotspot (captive portal) in case wifi connection fails\n  ap:\n    ssid: \"Pannuhuone-Outside-Temp\"\n    password: \"FALLBACK PASSWORD\"\n\ncaptive_portal:\n\nswitch:\n  - platform: gpio\n    pin: GPIO12\n    id: relay_12\n    name: \"Relay on GPIO12\"\n    # inverted: false  # Uncomment or remove if your relay logic is inverted\n\n  - platform: gpio\n    pin: GPIO13\n    id: relay_13\n    name: \"Relay on GPIO13\"\n    # inverted: false\n\n  - platform: gpio\n    pin: GPIO14\n    id: relay_14\n    name: \"Relay on GPIO14\"\n    # inverted: false\n\n# --- Create a select entity to choose the \"simulated\" outside temp state ---\nselect:\n  - platform: template\n    name: \"Outside Temperature Select\"\n    # The four states we want to show in Home Assistant:\n    options:\n      - \"default\"\n      - \"Real outside temp\"\n      - \"-15 outside temp\"\n      - \"-25 outside temp\"\n      - \"+20 outside temp\"\n   # Force a known startup choice\n   # initial_option: \"Real outside temp\"\n\n    # Don\u2019t restore the last-used value from flash\n    restore_value: false\n    # Called whenever the select changes in Home Assistant\n    set_action:\n      - lambda: |-\n          if (x == \"default\") {\n            \/\/ All pins LOW\n            id(relay_12).turn_off();\n            id(relay_13).turn_off();\n            id(relay_14).turn_off();\n          } else if (x == \"Real outside temp\") {\n            \/\/ All pins LOW\n            id(relay_12).turn_off();\n            id(relay_13).turn_off();\n            id(relay_14).turn_off();\n          } else if (x == \"-15 outside temp\") {\n            \/\/ Pin 12 &amp; 13 HIGH, pin 14 LOW\n            id(relay_12).turn_on();\n            id(relay_13).turn_on();\n            id(relay_14).turn_off();\n          } else if (x == \"-25 outside temp\") {\n            \/\/ Pin 13 &amp; 14 HIGH, pin 12 LOW\n            id(relay_12).turn_off();\n            id(relay_13).turn_on();\n            id(relay_14).turn_on();\n          } else if (x == \"+20 outside temp\") {\n            \/\/ Pin 13 HIGH only\n            id(relay_12).turn_off();\n            id(relay_13).turn_on();\n            id(relay_14).turn_off();\n          }<\/code><\/pre>\n\n\n\n<p>After adding the ESP module to home assistant you get a nice automatic select control and individual relay controls<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"216\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/40e1f027ad71306a6ec67ed8e5627ad3_MD5.png\" alt=\"\" class=\"wp-image-4386\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/40e1f027ad71306a6ec67ed8e5627ad3_MD5.png 464w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/40e1f027ad71306a6ec67ed8e5627ad3_MD5-300x140.png 300w\" sizes=\"auto, (max-width: 464px) 100vw, 464px\" \/><\/figure>\n<\/div>\n\n\n<p><br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"198\" height=\"324\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/842af04a749746c48bbcacd2feb9420b_MD5.png\" alt=\"\" class=\"wp-image-4387\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/842af04a749746c48bbcacd2feb9420b_MD5.png 198w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/842af04a749746c48bbcacd2feb9420b_MD5-183x300.png 183w\" sizes=\"auto, (max-width: 198px) 100vw, 198px\" \/><\/figure>\n<\/div>\n\n\n<p>This approach &#8211; combining hardware simplicity with smart software control\u2014makes it an attractive solution for anyone looking to optimize their home\u2019s heating and cooling system using IoT technology.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building automation with this setup<\/h2>\n\n\n\n<p>Now that the building blocks are ready you can get creative with building automations.<\/p>\n\n\n\n<p>Here is a simple example of what can be done:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/3edd4d60a0b1219cd94b49bf9a8047c8_MD5-768x1024.png\" alt=\"\" class=\"wp-image-4388\" srcset=\"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/3edd4d60a0b1219cd94b49bf9a8047c8_MD5-768x1024.png 768w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/3edd4d60a0b1219cd94b49bf9a8047c8_MD5-225x300.png 225w, https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/3edd4d60a0b1219cd94b49bf9a8047c8_MD5.png 1080w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>alias: s\u00e4hk\u00f6n hintaohjaus l\u00e4mmitysboost halvat tunnit\ndescription: \"\"\ntriggers:\n  - entity_id:\n      - binary_sensor.4_cheapest_hours\n    from: \"off\"\n    to: \"on\"\n    trigger: state\nconditions:\n  - condition: numeric_state\n    entity_id: sensor.nordpool_delta\n    above: 10\n  - condition: numeric_state\n    entity_id: weather.forecast_home\n    attribute: temperature\n    below: -5\n    above: -13\nactions:\n  - choose:\n      - conditions:\n          - condition: state\n            entity_id: input_select.lampopumppuohjaus\n            state: Talvi\n        sequence:\n          - action: select.select_option\n            metadata: {}\n            data:\n              option: \"-15 outside temp\"\n            target:\n              entity_id: select.pannuhuone_outside_temp_outside_temperature_select\nmode: single<\/code><\/pre>\n\n\n\n<p>By integrating these components, you can transform your home automation setup into a dynamic system that not only improves energy efficiency but also offers unprecedented control over your indoor environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In modern smart home automation there is often a need to integrate temperature-controlled devices that have no IOT capabilities at all. This article explores a&hellip;<\/p>\n","protected":false},"author":3,"featured_media":4381,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[100,2],"tags":[16,106,183,432,7],"class_list":["post-4377","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-assistant","category-inspiration","tag-diy","tag-energy-saving","tag-esp32","tag-hardware","tag-home-assistant","has-post-thumbnail-archive"],"acf":[],"featured_image_src":"https:\/\/www.creatingsmarthome.com\/wp-content\/uploads\/2025\/03\/8065a0548dbdfd388c0d609f24cb4030_MD5.png","author_info":{"display_name":"Mihail","author_link":"https:\/\/www.creatingsmarthome.com\/index.php\/author\/mihail\/"},"_links":{"self":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/4377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/comments?post=4377"}],"version-history":[{"count":3,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/4377\/revisions"}],"predecessor-version":[{"id":4395,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/posts\/4377\/revisions\/4395"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media\/4381"}],"wp:attachment":[{"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/media?parent=4377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/categories?post=4377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creatingsmarthome.com\/index.php\/wp-json\/wp\/v2\/tags?post=4377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}