I am trying to get the state attribute “temperature” of the climate in ESPHome.
Sadly I’m unable to find any information about how to do this.
I’ve tried different things like
- .state.attributes.temperature
- .state.attribute.temperature
- .attributes.temperature
- .temperature
but none of them seem to work.
Always getting error: 'class esphome::thermostat::ThermostatClimate' has no member named 'xxx'
binary_sensor:
- platform: template
name: ${device_prefix} Zieltemperatur erreicht
lambda: |-
if (id(water_temp).state >= id(heater_climate).temperature) { # <- get the "temperature" attribute
return true;
} else {
return false;
}
The climate:
climate:
- platform: thermostat
id: heater_climate
...