[ { "id": "Report outdoor temp to SmartTerm from weather", "automation": "- alias: Report outdoor temp to SmartTerm from weather\n description: Script for reporting outdoor temperature to the SmartTerm controller\n from home assistant weather integration\n trigger:\n - platform: time_pattern\n seconds: /30\n condition:\n - condition: template\n value_template: '{{ states(source_entity) != ''unavailable'' and states(target_entity)\n != ''unavailable'' }}'\n action:\n - if:\n - condition: template\n value_template: '{{ (state_attr(source_entity, ''temperature'')|float(0) - states(target_entity)|float(0))\n | abs | round(2) >= 0.1 }}'\n then:\n - service: number.set_value\n data:\n value: '{{ state_attr(source_entity, ''temperature'')|float(0)|round(2) }}'\n target:\n entity_id: '{{ target_entity }}'\n variables:\n source_entity: weather.forecast_home_assistant\n target_entity: number.NAME_t_outdoor\n mode: single", "config": [ { "name": "forecast home assistant weather", "room": null, "type": "weather", "id": { "entity_id": "weather.forecast_home_assistant", "device_id": null } }, { "name": "NAME t outdoor", "room": null, "type": "number", "id": { "entity_id": "number.NAME_t_outdoor", "device_id": null } } ] }, { "id": "Report indoor temp to SmarTherm controller", "automation": "- alias: Report indoor temp to SmarTherm controller\n description: Script for reporting indoor temperature to the SmartTerm controller\n from home assistant temperature sensor\n triggers:\n - trigger: time_pattern\n seconds: /10\n conditions:\n - condition: template\n value_template: '{{ states(''source_entity'') != ''unavailable'' }}'\n actions:\n - if:\n - condition: template\n value_template: '{{ (states(source_entity)|float(0) - states(target_entity)|float(0))\n | abs | round(2) >= 0.05 }}'\n then:\n - action: number.set_value\n metadata: {}\n data:\n value: '{{ states(source_entity)|float(0)|round(2) }}'\n target:\n entity_id: '{{ target_entity }}'\n variables:\n source_entity: sensor.YOUR_SENSOR\n target_entity: number.NAME_t_indoor\n mode: single", "config": [ { "name": "YOUR SENSOR", "room": null, "type": "sensor", "id": { "entity_id": "sensor.YOUR_SENSOR", "device_id": null } }, { "name": "NAME t indoor", "room": null, "type": "number", "id": { "entity_id": "number.NAME_t_indoor", "device_id": null } } ] } ]