I seem to be in the habit of adding the same “diagnostic” type sensors to all of my ESPHome devices to the point where I have now put them in a separate file that I then reference using an “include”.
Does anyone else do this and if so what kind of sensors are you adding?
I’m trying to strip back and simplify my HA/ESPHOME set-up which has grown unwieldy and cluttered in the wild.
One thing I was tinkering with was having a device level toggle (substitution) for internal: that you could activate/deactivate during development and debugging for a sub-set of sensors (typically intermediate ones such as the sources of copy sensors).
substitutions:
internal_mode: "true"
##################################################
#Data Update Sensors.
#These were useful during dev. Might remove in prod.
#All updated via other sensors.
##################################################
#Moisture
- platform: template
name: Moisture updated
id: solar_plant_moisture_level_recieved
internal: ${internal_mode}
Will try this template in mine, I just used the default, I thought you were going to talk about the hardware sensors. I am excited to learn more about these yaml configurations.
I also have common sensors but not in a separate yaml. I recently started playing around with packages and breaking up my yaml files. I have a top level device yaml then seprate wifi & specific hardware yaml. The hardware yaml has the sensors but those could also be broken out I suppose.
For info sensors like signal strength I add state_class: ’ ’ so they don’t add to long term statistics.
That bit blinking the LED gives me a local (at the device) indication that it’s alive and well.
I’ve read all the admonishments against leaving the web server active. However, my use cases are simple and I haven’t found that it impacts performance, even on old 8266’s.