Folks,
I do have some sensors,
fibaro and two climate sensor where the temp is a attribute. All three do report result. What I wanna do now, is create an average templete sension which is calculating the average temp. But you imagine my try does not work
You might want to play with this the template work area in hass its one of the icons at the bottom of the menu. THen you can past this code in and mess around with it until you get something that works. I tried it with my temp sensors and this worked. Putting () around the addition and division calculation seem to do the trick
works like a charm. Can anybody help how I can get more than one min/max sensor. Created a minmax.yaml with:
platform: min_max
sensors:
waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.fibaro_buero_temperature
- sensor.fibaro_gang_temperature
- sensor.fibaro_wohnzimmer_temperature
- sensor.fibaro_kueche_temperature
- sensor.fibaro_schlafzimmer_temperature
- sensor.vision_multisensor_bad_temperature
wohnzimmer_waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.fibaro_wohnzimmer_temperature
- sensor.wohnzimmer_thermostat_temp_rechts
- sensor.wohnzimmer_thermostat_temp_links
- sensor.wohnzimmer_wand_temp
buero_waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.fibaro_buero_temperature
- sensor.buero_wand_temp
- sensor.buero_thermostat_temp
kueche_waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.fibaro_kueche_temperature
bad_waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.vision_multisensor_bad_temperature
- sensor.bad_wand_temp
- sensor.bad_thermostat_temp
schlafzimmer_waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.fibaro_schlafzimmer_temperature
- sensor.schlafzimmer_wand_temp
- sensor.schlafzimmer_thermostat_temp
gang_waerme:
# type: min, max or mean
type: mean
entity_ids:
- sensor.fibaro_gang_temperature
2017-11-09 20:09:46 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.min_max]: required key not provided @ data['entity_ids']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.min_max/
platform: min_max
sensors:
sensor123:
entity_ids:
- sensor.fibaro_buero_temperature
- sensor.fibaro_gang_temperature
name: sensor123
type: mean
sensor345:
entity_ids:
- sensor.fibaro_buero_temperature
- sensor.fibaro_gang_temperature
name: sensor456
type: mean
hass --script check_config
Testing configuration at /home/homeassistant/.homeassistant
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up mqtt
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain mqtt took 0.0 seconds.
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up http
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up recorder
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up api
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up history
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setting up frontend
2017-11-09 20:12:57 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2017-11-09 20:12:57 ERROR (MainThread) [homeassistant.config] Invalid config for [sensor.min_max]: required key not provided @ data['entity_ids']. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.min_max/