Skip to content

Instantly share code, notes, and snippets.

@thejeffreystone
Created June 9, 2023 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thejeffreystone/3f11aaf75fd95175b674f98e030507af to your computer and use it in GitHub Desktop.
Save thejeffreystone/3f11aaf75fd95175b674f98e030507af to your computer and use it in GitHub Desktop.
where to put sensors
# There are three ways you can add your sensors to Home Assistant, and they all start in the configuration.yaml file
#
# First you can just add them directly:
sensor:
- platform:
name:
# Or you can create a seperate file like sensors.yaml,
# you will need to of course create the sensors.yaml file first but add this to your configuration.yaml:
sensor: !include sensor.yaml
# then after restart will will load any sensor that in that file.
# Or if you want to get more organized, you could go with a directory of yan files dedicated to sensors.
# This way you could create a folder called sensors and in that folder have a power.yaml file for any power based sensor
# and may be one called stats.yaml for statistic based sensors.
# you could then use this so that home assistant just loads every yaml file in that directory:
sensor: !include_dir_merge_list sensors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment