Make it possible to add custom metadata to devices

As a user of home assistant I would like be able to attach custom metadata to my devices so that they can be used in scripts or automation.

Example of metadata I would like to add to my Somfy RTS store operated through an RFXCOM bridge.

{
    orientation: 50°,
    direct_light_exposure_start: 48°,
    direct_light_exposure_end: 60°,
    stop_event_code: "0C1A00040C0200010B00000000"  // So that I can implement
}

Usage:
Orientation: in sun azimuth-based store management rules, this orientation to be used to optimize the store management and maximize the exposure period to indirect sunlight.
direct_light_exposure_start and direct_light_exposure_end may allow to take into consideration when I should close the store and open is based on sun azimuth. May take into consideration several factors: building aisle casting shadows, wall thickness, or any other obstacle.
stop_event_code: My somfy RTS stores have the possibility to memorize the store position by holding the stop button pressed. This is achievable over an RFXCOM bridge by sending a specific event. Having the possibility to store this code event directly on the device would be very convenient and would fit in an object oriented programming.

This featue request is generic and, I think would open up Home Assistant to a new level of ease of use and use cases such as generic rules based on metadata.

Thank you in advance for considering this feature request.

Another possible use case I can think of:

For smart home speakers:

{
     whisper-volume: 10, // During evening for instance
     normal-volume: 50, // as the right volume may differ from a room to another.
     alerte-volume: 100 // not to miss any important vocal notification through a Google Mini for instance 
}

´´´

A use case that would help me: I have battery powered sensors. I’d like to store the battery type as meta-data assigned to the sensor entity. This way when I’m buying new batteries, I’ll know what type(s) I need to buy

1 Like

Here, this might help for batteries GitHub - andrew-codechimp/HA-Battery-Notes: A Home Assistant integration to provide battery notes of devices

As for the original request, it should be already possible to add custom metadata using customize.yaml