I’d find very useful to let user setting a custom attribute to an entity, save, and get the entity class receiving that attribute.
This can be useful to let the integration send a configuration to a device.
For example, if a hardware module (connected to a bus or wireless) has a port (GPIO) that can be configured as analog or digital input,
- the user should set a custom attribute “config” with value “analog”
- the integration class received a notification about the attribute “config” changing and
- the integration class will send a command to the hardware device so that input port will be configured from digital to analog.
This is just an example.
Actually, if I’m not wrong, the entity class (step 2) is not notified about any configuration made through the configuration → customization menu: am I right?
Is there any other way to achieve this function?
Maybe this solution can be useful for many integrations…
For example, in Domoticz every entity has a name and a description: description can be used by the user to store some info (where that switch is placed, or what hardware is used) and also to specify a list of commands that can be used by the Domoticz integration to configure that hardware properly.
Ok, Domoticz UI is quite terrible and not comparable with HA, but the additional “Description” field is very useful.
In this example we have a module with some GPIOs, this GPIO is configured as input, counter, type kWh (in this case it counts the power/energy imported from grid), and the device with ID=99 is the counter that counts in the opposite direction (export power/energy).
When you click on Save button, the integration is notified about the configuration change.
As you can see, the user have the ability to use a simple text field to configure the hardware device very easily.
I’m asking if there is a solution in HA to let user send configuration to their devices.