Skip to content

Latest commit

 

History

History
223 lines (150 loc) · 6.81 KB

README.md

File metadata and controls

223 lines (150 loc) · 6.81 KB

Custom More-info for Home Assistant

hacs_badge GH-release GH-downloads GH-last-commit GH-code-size

What is Custom More-info

This is a custom Plugin for Home Assistant to customize which entity attributes are displayed in the Dashboard on more-info cards. Moreover, if configured so that no more attributes are left to display (all attributes are filtered), the attributes dropdown box is not rendered at all.

Next to that, with this plugin users can customize when and when not to display the History and Logbook sections in the More-info card. Even the History icon in the Header can be hidden.

From now on you are in control of the More-info attributes and all other sections. Filter all, unfilter all, or select which to see/hide by glob, domain, device_class, or entity_id. Any combination is possible!

Custom More-info gives the user ultimate control over the More-info panel.

If you want to hide the more-info panel completely, use Kiosk-mode, which is the ultimate tool for that and much more. Or check this card-mod mod for preventing the more-info in individual entities.

Note: This superseeds the existing custom-attributes plugin that focusses solely on the attributes Custom-attributes.


Installation

Download and install the plugin like any other custom resource in Home Assistant.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Enable

To enable the plugin one needs to add the custom_more_info parameter to the root of the lovelace yaml file of each Dashboard:

custom_more_info:
   # Configuration

Configuration options

Available configuration options:

  • debug

  • auto_hide_header_history_icon

  • hide_header_history_icon

  • unhide_header_history_icon

  • hide_history

  • unhide_history

  • hide_logbook

  • unhide_logbook

  • filter_all

  • unfilter_all

  • filter_attributes

  • unfilter_attributes

custom_more_info:
  debug: true

  auto_hide_header_history_icon: true
  hide_header_history_icon:
    # parameters
  hide_header_history_icon:
    # parameters

  filter_all: true
  unfilter_all: true
  filter_attributes:
    # parameters
  unfilter_attributes:
    # parameters   

The parameters control which attributes and sections should be (un)filtered in the more-info dialogs.

Available parameters:

4 'by' parameters allowing detailed customization on various levels, requiring an array of attributes

  • by_entity_id
  • by_domain
  • by_device_class
  • by_glob

All possible options:

custom_more_info:

  debug: true/false
  filter_all: true ##
  filter_attributes:
    by_entity_id:
      sensor.some_sensor:
        - <attribute>
        - <attribute>
    by_domain:
      binary_sensor:
        - <attribute>
        - <attribute>
    by_device_class:
      motion:
        - <attribute>
        - <attribute>
    by_glob:
      'sensor.*_sensor':
        - <attribute>
        - <attribute>
      '*.*':
        - <attribute>

# identical structure for 'unfilter' on all parameters

  unfilter_all: true ##
  unfilter_attributes:
    by_entity_id:

    by_domain:

    by_device_class:

    by_glob:

Special filter 'all'

The all filter is available for all parameters:

filter_attributes:
  by_domain:
    light:
      - all

and here, will filter all attributes on all Domain Light more-info panels.

For the header-history-icon we also have a special all setting:

custom_more_info:
  ## The same with unhide_header_history_icon , hide_history, hide_logbook, unhide_history, and unhide_logbook 
  hide_header_history_icon:
    all: true

Filter merge

Finally, all configured filters are merged. To check the complete filter that gets applied, enable debug: true and open an Inspector window, where the full JSON object is printed.

Examples

Please find some real life examples here which explains all available options in detail.

Prevent More-info completely

This plugin is for customizing the more-info panel. If you want to prevent the More-info from popping up completely, you can do so using card-mod stylings:

card_mod:
  style:
    hui-generic-entity-row $: |
      state-badge {
        pointer-events: none;
      }

which would prevent the pop-up when clicking the icon, but still allows interaction on a dropdown, eg when using an input_select entity. Preventing the more-info completely can be done with:

card_mod:
  style: |
    :host {
       pointer-events: none;
    }

Result of Custom More-info

Before filtering:

Device_class attribute options

Device class options before

Siren:

Siren before

Light group:

Light group before

After filtering

Device_class attribute options after ('Mogelijke statussen' in Dutch)

Device class options after

Siren after:

Siren after

Light group after:

Light group after