Custom component for programatic customize

I wrote a customizer custom component that exposes a service allowing to change customize values programatically.

set_attribute:
  description: >
    Set or clear persistent attribute of an entity overriding any value set in code.
    Note that calling homeassistant.reload_core_config will reset overrides to their yaml state.
  fields:
    entity_id:
      description: Entity ID to set the attribute on.
      example: light.patio
    attribute:
      description: Name of the attribute to set.
      example: friendly_name
    value:
      description: >
        (Optional) Value to set. Leave empty to clear set value.
        Note that when clearing attribute it will be empty (and not set-by-code) until next entity update.
      example: 'My light'

A downside I don’t see how to overcome yet, is that when clearing customize attribute it won’t take an effect until next entity update.

4 Likes

Your work on improving access to the UI is much appreciated. Just wanted to say that.

2 Likes