Set the temperature of Generic Thermostat at sunrise and sunset

I’m trying to figure out the easiest and simplest way to have temperature A at sunset, and then temperature B at sunrise. These values do not need to change once set. Is there a way to do this ? I was hoping I could use an automation from the GUI, but I do not see any of the thermostat’s entities (like temperature) available.

I’m sort of new to Home Assistant so I appreciate the help.

An automation like this can be made from the GUI editor

alias: Set Temp at Sunrise
description: ''
trigger:
  - platform: sun
    event: sunrise
condition: []
action:
  - service: climate.set_temperature
    target:
      entity_id: climate.pool
    data:
      temperature: 24
mode: single

The entity IDs for my generic thermostats look like “climate.pool”, look in the entities list for something labeled the same as your thermostat name.

1 Like

Thank you. That code helped me understand that the Action wasn’t supposed to be doing something with a device, but to rather call a service. After that, it was simple to follow.
I really appreciate your response and help @Kdem. I had been struggling with this for a few days, but now have it working perfectly.

1 Like