Thermostat Calibration Blueprint

A blueprint for thermostat calibration based on external and local temperature sensors.

blueprint:
  name: Thermostat Calibration Blueprint
  description: A blueprint for thermostat calibration based on external and local temperature sensors.
  domain: automation
  input:
    thermostats:
      name: Thermostats Configuration
      description: List of thermostat entities, their external temperature sensors, and thermostat entities.
      default: []
      selector:
        list:
          element:
            object:
              entity_id:
                description: The entity_id of the thermostat calibration entity (number type).
                selector:
                  entity:
                    domain: number
              external_temp_sensor:
                description: The entity_id of the external temperature sensor.
                selector:
                  entity:
                    domain: sensor
              thermostat_entity:
                description: The entity_id of the thermostat entity providing the local temperature.
                selector:
                  entity:
                    domain: climate
  trigger:
    - platform: time_pattern
      minutes: "0"  # Triggers every the choice you've specified period
  condition: []
  action:
    - repeat:
        for_each: "{{ input.thermostats }}"
        sequence:
          - variables:
              entity_id: "{{ repeat.item.entity_id }}"
              external_temp: "{{ states(repeat.item.external_temp_sensor) | float(default=0) }}"
              thermostat_temp: "{{ state_attr(repeat.item.thermostat_entity, 'local_temperature') | float(default=0) }}"
              current_correction: "{{ states(repeat.item.entity_id) | float(default=0) }}"
              calculated_diff: >
                {% set diff = (external_temp - thermostat_temp + current_correction) %}
                {{ diff | round(0) | int }}
              correction: >
                {% if calculated_diff == current_correction %}
                  {{ current_correction }}
                {% else %}
                  {{ calculated_diff }}
                {% endif %}
          - service: number.set_value
            target:
              entity_id: "{{ entity_id }}"
            data:
              value: "{{ correction | float }}"
mode: single

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Hello Ikonnikov Dmitriy,

Thanks for contributing to the community with a new Blueprint.

I have a suggestion for you. Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.
Adding a MY link for this Blueprint to your top post would help them a lot.

Here is the link to make that.

Create a link – My Home Assistant

Большое спасибо за подсказку, я не сразу понял как этим пользоваться.
Thanks so much for the tip, I didn’t immediately realize how to use it.

1 Like

@Izya12 , importing your blueprint doesn’t work: “No valid blueprint found in the gist. The blueprint file needs to end with ‘.yaml’”

1 Like