New Plugin: Custom Attributes (for More-info cards)

pleased to announce the release version 1.0.0 or our new plugin Custom-attributes, that allows the user to control which attributes are displayed in the attributes dropdown on the more-info cards.

install as custom repo in HACS: Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

You can filter attributes that are shown, or unfilter attributes that HA filters by default.

@elchininet has been finetuning my suggestions, and has done most if not all of the coding, so kudos to him are in order!

If have been trying to keep custom-ui alive for years now, but the time has come to slowly say goodbye to that powerful plugin (it still is), and create more modern plugins to do some of its tasks separately.

Please checkin at the repo of Custom-attributes, have a look at its options and examples, and customize those attributes to your liking.

Want to take out all attributes on a light? no problem. There’s a powerful all filter.

filter_attributes:
  by_domain:
    light:
      - all

Want to see the device_class on domain binary_sensor (hidden by default)? go ahead.

unfilter_attributes:

  by_domain:
# filtered by Home Assistant by default
    binary_sensor:
      - device_class

You can filter and unfilter by_domain, by_glob, by_entity_id, and by_device_class.

You could even hide all attributes everywhere by setting:

filter_attributes:
  by_glob:

    '*.*':
      - all

The filter attributes works on all more-info cards, even when invoked from the developer-tools/state

Currently this is what I am using myself, and it cleans up the cards just perfectly:

##########################################################################################
# Custom attributes configuration settings                                               #
# use a config per Dashboard, and add it to the root of the yaml file like               #
#                                                                                        #
#      ############################################################################      #
#      # title: Your Dashboard title                                              #      #
#      #                                                                          #      #
#      # button_card_templates: !include_dir_merge_named ../button_card_templates #      #
#      # decluttering_templates: !include_dir_named ../decluttering_templates     #      #
#      # kiosk_mode: !include ../kiosk-mode/kiosk-mode.yaml                       #      #
#      # custom_attributes: !include ../custom_attributes/custom_attributes.yaml  #      #
#      #                                                                          #      #
#      # views:                                                                   #      #
#      #   - !include view_home.yaml                                              #      #
#      #   - !include view_number_two                                             #      #
#      #   - etc                                                                  #      #
#      ############################################################################      #
#                                                                                        #
##########################################################################################

# use the available 'debug' paramater if a filter does not work and you need to report
# malfunctioning to the issue tracker.

debug: true

##########################################################################################
# Unfilter                                                                               #
##########################################################################################

unfilter_attributes:

  by_domain:
# filtered by Home Assistant by default
    binary_sensor:
      - device_class

    sensor:
      - device_class

# filtered by User in the filter_attributes
  by_glob:

    'device_tracker.google*':
      - ip
      - mac
      - ap_mac

##########################################################################################
# Filter                                                                                 #
##########################################################################################

filter_attributes:

  by_glob:

    '*.*':
      - icon_color
      - id

# first filter 'all' in glob, then unfilter only what user needs in the unfilter section
    'device_tracker.google*':
      - all

    'sensor.ha_*_version':
      - all

    'sensor.buienradar_*':
      - Stationname

    'sensor.*_actueel': &meter # use a yaml anchor to easily c&p repetitive attributes
      - meter_type
      - meter_type_name

    'sensor.*_totaal': *meter

    'sensor.*_amperage': *meter

    'sensor.*_voltage': *meter

    'sensor.*_battery_state':
      - templates

  by_device_class:

    enum:
      - options

  by_domain:

    binary_sensor:
      - hysteresis

    light:
      - all

    siren:
      - available_tones

  by_entity_id:

    sensor.cpu_speed:
      - brand
      - arch

    group.media_players_device_trackers:
      - all

    group.hub_device_trackers:
      - all

thanks for checkin in!

4 Likes