#Passing Values in Automations through GUI

1 messages · Page 1 of 1 (latest)

formal sonnet
#

Under Automations I am trying to change the target temperature of my Nest thermostat to the same target temperature of my Generic thermostat on any change to the target temperature of the Generic thermostat. Is it possible to do this through the UI without editing the .yaml?

soft narwhal
#

yeah, just use a state trigger on the Generic thermostat. Don't specify a to or from (or make it 'Any state' / null).

In the climate.set_temperature you will have to use a template. If the above trigger is the only trigger you could use "{{ trigger.to_state.state }}" as value.

formal sonnet
soft narwhal
#

in the UI without the quotes. It should add it to the yaml.

And I would pick the entity rather than the device.

formal sonnet
#

it's not working i saved it i go back and target temp is empty

#

ok i edited in yaml and pasted it now it looks right

#

buuuut it's not working

soft narwhal
formal sonnet
#

this is the top

#

ok

#
alias: Thermostat Sync
description: ""
triggers:
  - trigger: state
    entity_id:
      - climate.virtual_thermostat
    attribute: temperature
conditions: []
actions:
  - action: climate.set_temperature
    metadata: {}
    data:
      temperature: "{{ trigger.to_state.state }}"
    target:
      entity_id: climate.entryway
mode: single
#

whoops

#

boom

#

it's definitely triggering

#

but it's not changing the temperature in nest thermostat

#
climate:
  - platform: generic_thermostat
    name: Virtual Thermostat
    unique_id: virtual_thermostat_id
    heater: input_boolean.virtual_thermostat_switch
    target_sensor: sensor.virtual_temperature_sensor
    initial_hvac_mode: "cool"
    min_temp: 68
    max_temp: 80
    ac_mode: true
    target_temp: 76
#

this is the yaml for the generic thermostat

#

could it be an integer/float issue

#

i can change the precision

#

alright it was 1.0 i tried changing to 0.1 but it's still not updating

misty tiger
#

Your template is setting the entryway thermostat to the state of the virtual one... The state of a climate entity is either "cool", "heat", or "off"; none of which are valid values for temperature. If the goal is for the target temperatures to match, you need to change your template to provide the temperature attribute:

alias: Thermostat Sync
description: ""
triggers:
  - trigger: state
    entity_id:
      - climate.virtual_thermostat
    attribute: temperature
conditions: []
actions:
  - action: climate.set_temperature
    metadata: {}
    data:
      temperature: "{{ trigger.to_state.attributes.temperature }}"
    target:
      entity_id: climate.entryway
mode: single
formal sonnet
#

thanks