Controlling temprature values in automation in dashboard in HA

Tags: #<Tag:0x00007fc40b9bd738>

Hello. I have one question regarding controlling temprature values in automation. Now I change temprature value in HA in Configuration. for example if I want to turn on heating system above 31 celcius not 35 celcius, I change 35 to 31 from configuration tab. But I would like to control this 35 or 31 celcius degrees in dashboard (main menu). I am open for coding or any other suggestion to reach this goal.

FYI, for this automatization we use MI temprature sensor, aqara relay, selenoid valve.

Just create an input_number helper and use its state in your automation.

1 Like

i create a imput number but i do not use it. can you help me ?

You didn’t give us much to work with, but it would look something like this:

  - id: heating
    alias: heating
      - platform: numeric_state
        entity_id: sensor.temperature_current
        above: input_number.temperature_target
      - service: switch.turn_on
        entity_id: switch.heating

Why you would turn on the heating, when it is already warm eludes me though.

Have you considered using the Generic Thermostat integration?

It produces a climate entity which is displayed by the Thermostat card in the UI.

1 Like

yes of course. which of this you can prefer ? (which you can give advice? )

Copy-paste this into your configuration.yaml file:

  - platform: generic_thermostat
    name: Thermostat
    heater: switch.your_heater_switch
    target_sensor: sensor.your_temperature_sensor
    min_temp: 15
    max_temp: 35
    target_temp: 22
      seconds: 15
    initial_hvac_mode: "off"

Change the names of the switch and temperature sensor to match the ones you have.

Save the file and restart Home Assistant.

Check Developer Tools > States and you should see a new entity called climate.thermostat

You can add a Thermostat card to your Lovelace UI in order to control climate.thermostat

1 Like