I know this if i have this in a yaml file
entity_id: climate.gas_heater
and do this
ENTITY_ID = data.get("entity_id", None)
ENTITY_ID has the data I want
so by doing this
state_climate = hass.states.get(ENTITY_ID)
state_climate has the state in it
so
current_temperature = state_climate.attributes.get("current_temperature")
temperature = state_climate.attributes.get("temperature")
and I have the data I want
BUT NOW the question
how do i read the heater item from the object
i have
- platform: generic_thermostat
name: "Gas Heater"
heater: switch.gas_heater ##### <-- read this
target_sensor: sensor.lounge_temperature
min_temp: 15
max_temp: 30
ac_mode: False
target_temp: 20.8
initial_hvac_mode: "off"
cold_tolerance: 0.1
hot_tolerance: 0.1
away_temp: 16