I have a bunch of ESP (WiFi devices) and I am using a device_tracker based on WiFi and MAC. This means that I know when the ESP are powered on and running because their device_tracker are in “home” state.
I would like to put that in the frontend, and I was trying to do it without an explicit sensor template. I can achieve what I want by doing:
- platform: template
fancontrol_living:
friendly_name: "My ESP8266 based Fan Controller"
value_template: "{{ is_state('device_tracker.fancontrol_living', 'home') }}"
This prepares the sensors in a way that Lovelace “lights them up” when the device is home, and keeps them “shadowed” when not (hope that makes sense).
Is that really necessary? Am I missing some configuration in Lovelace? I would like to control myself the “light-up-state” of an icon in frontend, specially for device_tracker --which kinda makes sense, from my point of view. And I was hoping to avoid all the boiler-plate sensor templates, if possible.