Feature/ integration centric configuration

Hi,
I was wondering if it would be possible to define all config related to an integration in one single file. It’s better to explain with one example. Consider a new sensor I’ve added to homeassistant, e.g. a battery powered esphome temperature sensor.

Once it’s in ha, I would love to define all ha-behavior related to this sensor in 1 file (or multiple files in 1 folder). This will contain:

  • additional binary sensors (e.g. to enable or disable specific automations)
  • automations related to battery level and temperatures
  • Lovelace card
  • other related metrics calculated based on this de does values (e.g. battery SOC based on battery voltage level reported by the sensor).
  • even the esphome code could be part of this

The whole idea is to modularize everything related to this sensor, and have a centralized way to deal with all related parts in code. Also, this will give blueprints a boost!

Is this feature available? Maybe via an existing plugin? Or is there a way to “mimic” this behavior?

Thanks

use packages

1 Like