Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter attributes not effective in iOS app #20

Open
Mariusthvdb opened this issue Jun 6, 2024 · 0 comments
Open

filter attributes not effective in iOS app #20

Mariusthvdb opened this issue Jun 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Mariusthvdb
Copy link
Owner

Mariusthvdb commented Jun 6, 2024

Describe the bug
A clear and concise description of what the bug is.

In iOS app, more info still shows custom. attributes icon_color and templates, probably more, but these are very important and related to the custom-ui plugin

Desktop filters these attributes correctly

HA was updated to 2024.6 recently, not sure if that is related

Debug JSON from Inspector

[Debug] { (custom-more-info.js, line 1)
    "debug": true,
    "auto_hide_header_history_icon": true,
    "hide_header_history_icon": {
        "by_entity_id": [
            "sun.sun"
        ]
    },
    "hide_history_logbook": {
        "by_domain": [
            "alarm_control_panel",
            "alert",
            "automation",
            "button",
            "camera",
            "climate",
            "counter",
            "cover",
            "fan",
            "geo_location",
            "group",
            "image",
            "input_boolean",
            "input_button",
            "input_datetime",
            "input_number",
            "input_select",
            "input_text",
            "light",
            "media_player",
            "number",
            "remote",
            "scene",
            "script",
            "select",
            "siren",
            "sun",
            "text",
            "timer",
            "update",
            "weather",
            "zone"
        ],
        "by_entity_id": [
            "zone.efteling"
        ],
        "by_device_class": [
            "battery",
            "sound"
        ],
        "by_glob": [
            "sensor.proximity_*",
            "zone.tandarts*"
        ]
    },
    "hide_history": {
        "by_entity_id": [
            "binary_sensor.ongemeten_verbruik_te_hoog",
            "sensor.ha_main_config",
            "sensor.buienradar_iungo_winddirection",
            "sensor.buienradar_iungo_locatie",
            "zone.efteling"
        ],
        "by_glob": [
            "sensor.knmi*",
            "sensor.tomorrow*",
            "sensor.afvalwijzer*",
            "sensor.awair_element_*",
            "sensor.distance_*",
            "sensor.*_naar_huis_duration"
        ]
    },
    "unhide_history_logbook": {
        "by_entity_id": [
            "light.slaapkamer_tafel",
            "light.televisie"
        ]
    },
    "unhide_history": {
        "by_entity_id": [
            "sensor.tomorrow_cloud_cover",
            "sensor.knmi_gevoelstemperatuur",
            "sensor.awair_element_humidity",
            "sensor.awair_element_carbon_dioxide"
        ]
    },
    "hide_logbook": {
        "by_domain": [
            "device_tracker"
        ],
        "by_device_class": [
            "sound"
        ]
    },
    "unfilter_attributes": {
        "by_domain": {
            "zone": [
                "persons"
            ],
            "device_tracker": [
                "ip",
                "mac",
                "ap_mac"
            ]
        },
        "by_glob": {
            "sensor.afvalwijzer*": [
                "days_until_collection_date",
                "is_collection_date_today",
                "is_collection_date_tomorrow",
                "is_collection_date_day_after_tomorrow"
            ]
        }
    },
    "filter_attributes": {
        "by_glob": {
            "*.*": [
                "templates",
                "icon_color",
                "id"
            ],
            "sensor.buienradar_*": [
                "Stationname"
            ],
            "sensor.*_actueel": [
                "meter_type",
                "meter_type_name"
            ],
            "sensor.*_totaal": [
                "meter_type",
                "meter_type_name"
            ],
            "sensor.*_amperage": [
                "meter_type",
                "meter_type_name"
            ],
            "sensor.*_voltage": [
                "meter_type",
                "meter_type_name"
            ],
            "group.*trackers": [
                "all"
            ],
            "sensor.afvalwijzer*": [
                "all"
            ]
        },
        "by_device_class": {
            "enum": [
                "options"
            ],
            "running": [
                "all"
            ]
        },
        "by_domain": {
            "zone": [
                "all"
            ],
            "device_tracker": [
                "all"
            ],
            "light": [
                "all"
            ],
            "siren": [
                "available_tones"
            ]
        },
        "by_entity_id": {
            "sensor.cpu_speed": [
                "brand",
                "arch"
            ],
            "sensor.schimmel_sensor": [
                "all"
            ]
        }
    }
}

Custom-more-info Version:
fixdeviceclass PR

Expected behavior
A clear and concise description of what you expected to happen.

filter just as on desktop

Screenshots
If applicable, add screenshots to help explain your problem.

20240606_201836000_iOS

while desktop shows correct:

Scherm­afbeelding 2024-06-06 om 22 22 16

Dom Path of attributes dropdown box
Always include screenshot to the path of the attributes that error
We cant help you without that exact info

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iPhone 13 Pro
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari] iOS companion app
  • Version [e.g. 22] 2024.6 (2024.693)

The custom-more-info configuration

##########################################################################################
# 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
auto_hide_header_history_icon: true

hide_header_history_icon:

  by_entity_id:
    - sun.sun

hide_history_logbook:

  by_domain:
    - alarm_control_panel
    - alert
    - automation
  #  - binary_sensor
    - button
    - camera
    - climate
    - counter
    - cover
  #  - device_tracker
  #  - event
    - fan
    - geo_location
    - group
    - image
    - input_boolean
    - input_button
    - input_datetime
    - input_number
    - input_select
    - input_text
    - light
    - media_player
    - number
  #  - person
    - remote
    - scene
    - script
    - select
  #  - sensor
    - siren
    - sun
  #  - switch
    - text
    - timer
    - update
    - weather
    - zone

  by_entity_id:
    - zone.efteling

  by_device_class:
    - battery
    - sound

  by_glob:
    - 'sensor.proximity_*'
    - 'zone.tandarts*'
#
# unhide_history_logbook:
#
#     by_entity_id:
#       -
#
#     by_domain:
#       -
#
#     by_device_class:
#       -
#
#     by_glob:
#       -

hide_history:
  by_entity_id:
     - binary_sensor.ongemeten_verbruik_te_hoog
     - sensor.ha_main_config
     - sensor.buienradar_iungo_winddirection
     - sensor.buienradar_iungo_locatie
     - zone.efteling

#   by_domain:
#     - zone
#     - input_select
#     - select
#     - input_boolean
#     - number
#     - input_number
#     - siren

#   by_device_class:
#     - sound
#     - battery

  by_glob:
    - 'sensor.knmi*'
    - 'sensor.tomorrow*'
#     - 'siren.*'
#     - 'input_number.*'
    - 'sensor.afvalwijzer*'
    - 'sensor.awair_element_*'
    - 'sensor.distance_*'
    - 'sensor.*_naar_huis_duration'

unhide_history_logbook:
  by_entity_id:
    - light.slaapkamer_tafel
    - light.televisie

unhide_history:

  by_entity_id:
    - sensor.tomorrow_cloud_cover
    - sensor.knmi_gevoelstemperatuur
    - sensor.awair_element_humidity
    - sensor.awair_element_carbon_dioxide

#   by_domain:
#     - some_domain
#     - some_domain
#
#   by_device_class:
#     - some_device_class
#     - some_device_class
#
#   by_glob:
#     - some_glob
#     - some_glob

hide_logbook:

#   by_entity_id:
#     - binary_sensor.ongemeten_verbruik_te_hoog
#     - binary_sensor.power_using_off_switches

  by_domain:
#     - input_select
#     - select
#     - input_boolean
#     - number
    - device_tracker

  by_device_class:
    - sound

#   by_glob:
#     - '*_over*_detected'

# unhide_logbook:
#
#   by_entity_id:
#     - some_entity
#     - some_entity
#
#   by_domain:
#     - some_domain
#     - some_domain
#
#   by_device_class:
#     - some_device_class
#     - some_device_class
#
#   by_glob:
#     - some_glob
#     - some_glob

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

#special boolean setting for all
# unfilter_all: true #/ false

unfilter_attributes:

  by_domain:

    zone:
      - persons

    device_tracker:
      - ip
      - mac
      - ap_mac

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

# filtered by User in the filter_attributes
  by_glob:

    'sensor.afvalwijzer*':
      - days_until_collection_date
      - is_collection_date_today
      - is_collection_date_tomorrow
      - is_collection_date_day_after_tomorrow

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

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

#special boolean setting for all
# filter_all: true

filter_attributes:

  by_glob:

    '*.*':
      - templates
      - icon_color
      - id

# filter all atributes on all entities
#       - all

# first filter 'all' in glob, then unfilter only what user needs in the unfilter section
#     'device_tracker.google*':
#       - all
#     'device_tracker.heater_*':
#       - 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

    'group.*trackers':
      - all

    'sensor.afvalwijzer*':
      - all

# test for custom-ui templates
#     'sensor.*_battery_state':
#       - templates

  by_device_class:

    enum:
      - options

    running: # used for threshold entities
      - all

  by_domain:

    zone:
      - all

    device_tracker:
      - all
#     binary_sensor:
#       - hysteresis

    light:
      - all

    siren:
      - available_tones

  by_entity_id:

    sensor.cpu_speed:
      - brand
      - arch

    sensor.schimmel_sensor:
      - all

Additional context
Add any other context about the problem here.

@Mariusthvdb Mariusthvdb added the bug Something isn't working label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant