I’m a complete noob to HA and honestly, I’m using it to monitor the toner and drum levels of the printers in my office at work. I got one printer’s status up and I started on a second, but I was thinking it would be nice to keep my sensors separate per machine. That said, I was wondering if there’s a way to separate my sensors into separate .yaml files per printer, or if they all have to be in one file. The only reason that I’d do this is purely for organization’s sake, of course! I tried making a “sensors” folder and then putting each file in there and just including them within the config.yaml ala “sensor: !include_dir_merge_named sensors” but that didn’t seem to work. It didn’t error out or anything, but I can’t call my sensors in my scripts for my cards anymore… Am I making this too complicated?
Okay - so in my configuration.yaml file, I do indeed only have one ‘sensor’ key, exactly like how you have it, @Troon (sorry, I can’t figure out how to format this as code…)
Then, within the folder, I have two .yaml files:
hs-b9100-sensors.yaml
hs-xe-colorsensors.yaml
I use all snmp sensors, so both files start out with:
-platform: snmp
name: ‘b9100_page_count’
and
-platform: snmp
name: ‘c600_page_count’
…and then both go into the other snmp oid’s that I found for each model.
Is that correct so far? I will say, it definitely worked when I had a single file (but I also had the single file in root directory, but I will admit that I didn’t check if the single file worked in the new folder before I created the second file).