Hi!
I have some template sensors which are taking their data from a Raspberry Pi, published through JSON at a REST endpoint. My HA config looks like this:
# Raspberry Pi (REST)
- platform: rest
name: RaspberryPiSensors
resource: http://192.168.0.222:5555/sensor
scan_interval: 60
json_attributes:
- temp_boiler_room
- temp_outdoor
- temp_stairwell
value_template: 'Sensor'
# Raspberry Pi (broken out)
- platform: template
sensors:
temp_boiler_room:
friendly_name: Boiler room temperature
value_template: '{{ states.sensor.raspberrypisensors.attributes["temp_boiler_room"] }}'
device_class: temperature
unit_of_measurement: '°C'
temp_outdoor:
friendly_name: Outdoor temperature
value_template: '{{ states.sensor.raspberrypisensors.attributes["temp_outdoor"] }}'
device_class: temperature
unit_of_measurement: '°C'
temp_stairwell:
friendly_name: Stairwell temperature
value_template: '{{ states.sensor.raspberrypisensors.attributes["temp_stairwell"] }}'
device_class: temperature
unit_of_measurement: '°C'
My question is: how can I assign these sensors to areas of the house (eg. Stairwell, Boiler room, Kitchen,. etc.). Sensors detected through integrations can be assigned to areas, but for template sensors I can’t find how to do it.
Thanks!