From a342c097e36625392ec445f8e09cc7c4de0f38a4 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 11 Dec 2024 19:05:23 -0800 Subject: [PATCH 1/2] Add entities for ld2410 to config. Add example code for sensor tuning. --- config/common/mmwave_ld2410.yaml | 151 ++++- .../dashboard_tools/ld2410_template_card.yaml | 612 ++++++++++++++++++ 2 files changed, 759 insertions(+), 4 deletions(-) create mode 100644 config/dashboard_tools/ld2410_template_card.yaml diff --git a/config/common/mmwave_ld2410.yaml b/config/common/mmwave_ld2410.yaml index 3ac77f3..b5c2554 100644 --- a/config/common/mmwave_ld2410.yaml +++ b/config/common/mmwave_ld2410.yaml @@ -7,14 +7,157 @@ uart: parity: NONE stop_bits: 1 +button: + - platform: ld2410 + factory_reset: + name: "LD2410 factory reset" + restart: + name: "LD2410 sensor restart" + query_params: + name: LD2410 update sensors + +select: + - platform: ld2410 + distance_resolution: + name: distance resolution + light_function: + name: light function + disabled_by_default: true + +sensor: + - platform: ld2410 + moving_distance: + disabled_by_default: true + name : Moving Distance + still_distance: + disabled_by_default: true + name: Still Distance + moving_energy: + disabled_by_default: true + name: Move Energy + still_energy: + disabled_by_default: true + name: Still Energy + detection_distance: + disabled_by_default: true + name: Detection Distance + light: + disabled_by_default: true + g0: + move_energy: + name: g0 move energy + still_energy: + name: g0 still energy + g1: + move_energy: + name: g1 move energy + still_energy: + name: g1 still energy + g2: + move_energy: + name: g2 move energy + still_energy: + name: g2 still energy + g3: + move_energy: + name: g3 move energy + still_energy: + name: g3 still energy + g4: + move_energy: + name: g4 move energy + still_energy: + name: g4 still energy + g5: + move_energy: + name: g5 move energy + still_energy: + name: g5 still energy + g6: + move_energy: + name: g6 move energy + still_energy: + name: g6 still energy + g7: + move_energy: + name: g7 move energy + still_energy: + name: g7 still energy + g8: + move_energy: + name: g8 move energy + still_energy: + name: g8 still energy + binary_sensor: - platform: ld2410 has_target: - name: Room Presence - id: room_presence + name: Presence has_moving_target: name: Moving Target has_still_target: name: Still Target - out_pin_presence_status: - name: out pin presence status \ No newline at end of file + +number: + - platform: ld2410 + timeout: + name: timeout + max_move_distance_gate: + name: max move distance gate + max_still_distance_gate: + name: max still distance gate + light_threshold: + name: light threshold + disabled_by_default: true + g0: + move_threshold: + name: g0 move threshold + still_threshold: + name: g0 still threshold + g1: + move_threshold: + name: g1 move threshold + still_threshold: + name: g1 still threshold + g2: + move_threshold: + name: g2 move threshold + still_threshold: + name: g2 still threshold + g3: + move_threshold: + name: g3 move threshold + still_threshold: + name: g3 still threshold + g4: + move_threshold: + name: g4 move threshold + still_threshold: + name: g4 still threshold + g5: + move_threshold: + name: g5 move threshold + still_threshold: + name: g5 still threshold + g6: + move_threshold: + name: g6 move threshold + still_threshold: + name: g6 still threshold + g7: + move_threshold: + name: g7 move threshold + still_threshold: + name: g7 still threshold + g8: + move_threshold: + name: g8 move threshold + still_threshold: + name: g8 still threshold + +switch: + - platform: ld2410 + engineering_mode: + name: "engineering mode" + bluetooth: + name: "control bluetooth" \ No newline at end of file diff --git a/config/dashboard_tools/ld2410_template_card.yaml b/config/dashboard_tools/ld2410_template_card.yaml new file mode 100644 index 0000000..38b8177 --- /dev/null +++ b/config/dashboard_tools/ld2410_template_card.yaml @@ -0,0 +1,612 @@ +#1. Install Mushroom, Decluttering card and Bar Card from HACS +#2. Put this card to section/layout (replace "device" with your satellite name, as it appears in entities IDs, like satellite1_92fb28). Do it for each satellite: +type: custom:decluttering-card +template: ld2410 +variables: + - device: satellite1_927228 +#2. Put this to the very bottom of dashboard YAML in raw edit mode (this should be done once per dashboard): +decluttering_templates: + ld2410: + card: + type: horizontal-stack + cards: + - type: custom:vertical-stack-in-card + cards: + - type: custom:mushroom-entity-card + entity: switch.[[device]]_engineering_mode + name: Preset edit mode + icon_color: pink + layout: horizontal + tap_action: + action: toggle + hold_action: + action: more-info + double_tap_action: + action: none + - type: custom:mushroom-number-card + entity: number.[[device]]_timeout + name: Detection cooldown + layout: horizontal + display_mode: buttons + - type: custom:mushroom-select-card + entity: select.[[device]]_distance_resolution + name: Gate resolution + icon_color: green + layout: horizontal + - type: custom:mushroom-entity-card + entity: switch.[[device]]_control_bluetooth + icon_color: indigo + name: Bluetooth + tap_action: + action: toggle + hold_action: + action: more-info + double_tap_action: + action: none + title: Settings + - type: custom:vertical-stack-in-card + title: Movement + cards: + - type: custom:mushroom-template-card + primary: >- + {{ iif(is_state(entity, 'on'), 'Detected, ' + + states('sensor.[[device]]_moving_distance') + ' cm', 'Not + detected') }} + secondary: '' + icon: mdi:motion-sensor + entity: binary_sensor.[[device]]_moving_target + icon_color: '{% if(is_state(entity, ''on'')) %} red {% endif %}' + layout: horizontal + multiline_secondary: false + - type: custom:mushroom-number-card + entity: number.[[device]]_max_move_distance_gate + name: Max detection gate + display_mode: buttons + icon: mdi:tape-measure + layout: horizontal + secondary_info: none + icon_color: green + - type: custom:mushroom-number-card + entity: number.[[device]]_g0_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 0 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g0_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g1_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 1 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g1_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g2_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 2 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g2_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g3_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 3 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g3_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g4_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 4 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g4_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g5_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 5 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g5_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g6_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 6 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g6_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g7_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 7 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g7_move_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g8_move_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 8 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g8_move_energy + color: orange + - type: custom:vertical-stack-in-card + title: Still + cards: + - type: custom:mushroom-template-card + primary: >- + {{ iif(is_state(entity, 'on'), 'Detected, ' + + states('sensor.[[device]]_still_distance') + ' cm', 'Not + detected') }} + secondary: '' + icon: mdi:motion-sensor + entity: binary_sensor.[[device]]_still_target + icon_color: '{% if(is_state(entity, ''on'')) %} red {% endif %}' + layout: horizontal + multiline_secondary: false + - type: custom:mushroom-number-card + entity: number.[[device]]_max_still_distance_gate + name: Max detection gate + display_mode: buttons + icon: mdi:tape-measure + layout: horizontal + secondary_info: none + icon_color: green + - type: custom:mushroom-number-card + entity: number.[[device]]_g0_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 0 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g0_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g1_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 1 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g1_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g2_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 2 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g2_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g3_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 3 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g3_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g4_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 4 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g4_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g5_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 5 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g5_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g6_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 6 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g6_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g7_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 7 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g7_still_energy + color: orange + - type: custom:mushroom-number-card + entity: number.[[device]]_g8_still_threshold + display_mode: slider + icon_type: none + primary_info: name + secondary_info: state + name: Gate 8 + card_mod: + style: + mushroom-number-value-control$: + mushroom-slider$: | + .slider { + height: 24px !important; + } + .: | + mushroom-number-value-control { + height: 24px; + } + - type: custom:bar-card + direction: right + columns: 1 + height: 16 + positions: + indicator: 'off' + icon: 'off' + name: 'off' + entities: + - entity: sensor.[[device]]_g8_still_energy + color: orange From c88eedd1c5d01d5d54b82fd26e0eadb77c577188 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 13 Dec 2024 14:08:46 -0800 Subject: [PATCH 2/2] Removed docs-related YAML. Renamed some sensors for uniformity. Small fixes. --- config/common/mmwave_ld2410.yaml | 43 +- .../dashboard_tools/ld2410_template_card.yaml | 612 ------------------ 2 files changed, 21 insertions(+), 634 deletions(-) delete mode 100644 config/dashboard_tools/ld2410_template_card.yaml diff --git a/config/common/mmwave_ld2410.yaml b/config/common/mmwave_ld2410.yaml index b5c2554..1b3f833 100644 --- a/config/common/mmwave_ld2410.yaml +++ b/config/common/mmwave_ld2410.yaml @@ -27,14 +27,12 @@ select: sensor: - platform: ld2410 moving_distance: - disabled_by_default: true name : Moving Distance still_distance: - disabled_by_default: true name: Still Distance moving_energy: disabled_by_default: true - name: Move Energy + name: Moving Energy still_energy: disabled_by_default: true name: Still Energy @@ -42,50 +40,51 @@ sensor: disabled_by_default: true name: Detection Distance light: + name: illuminance level disabled_by_default: true g0: move_energy: - name: g0 move energy + name: g0 moving energy still_energy: name: g0 still energy g1: move_energy: - name: g1 move energy + name: g1 moving energy still_energy: name: g1 still energy g2: move_energy: - name: g2 move energy + name: g2 moving energy still_energy: name: g2 still energy g3: move_energy: - name: g3 move energy + name: g3 moving energy still_energy: name: g3 still energy g4: move_energy: - name: g4 move energy + name: g4 moving energy still_energy: name: g4 still energy g5: move_energy: - name: g5 move energy + name: g5 moving energy still_energy: name: g5 still energy g6: move_energy: - name: g6 move energy + name: g6 moving energy still_energy: name: g6 still energy g7: move_energy: - name: g7 move energy + name: g7 moving energy still_energy: name: g7 still energy g8: move_energy: - name: g8 move energy + name: g8 moving energy still_energy: name: g8 still energy @@ -103,7 +102,7 @@ number: timeout: name: timeout max_move_distance_gate: - name: max move distance gate + name: max moving distance gate max_still_distance_gate: name: max still distance gate light_threshold: @@ -111,47 +110,47 @@ number: disabled_by_default: true g0: move_threshold: - name: g0 move threshold + name: g0 moving threshold still_threshold: name: g0 still threshold g1: move_threshold: - name: g1 move threshold + name: g1 moving threshold still_threshold: name: g1 still threshold g2: move_threshold: - name: g2 move threshold + name: g2 moving threshold still_threshold: name: g2 still threshold g3: move_threshold: - name: g3 move threshold + name: g3 moving threshold still_threshold: name: g3 still threshold g4: move_threshold: - name: g4 move threshold + name: g4 moving threshold still_threshold: name: g4 still threshold g5: move_threshold: - name: g5 move threshold + name: g5 moving threshold still_threshold: name: g5 still threshold g6: move_threshold: - name: g6 move threshold + name: g6 moving threshold still_threshold: name: g6 still threshold g7: move_threshold: - name: g7 move threshold + name: g7 moving threshold still_threshold: name: g7 still threshold g8: move_threshold: - name: g8 move threshold + name: g8 moving threshold still_threshold: name: g8 still threshold diff --git a/config/dashboard_tools/ld2410_template_card.yaml b/config/dashboard_tools/ld2410_template_card.yaml deleted file mode 100644 index 38b8177..0000000 --- a/config/dashboard_tools/ld2410_template_card.yaml +++ /dev/null @@ -1,612 +0,0 @@ -#1. Install Mushroom, Decluttering card and Bar Card from HACS -#2. Put this card to section/layout (replace "device" with your satellite name, as it appears in entities IDs, like satellite1_92fb28). Do it for each satellite: -type: custom:decluttering-card -template: ld2410 -variables: - - device: satellite1_927228 -#2. Put this to the very bottom of dashboard YAML in raw edit mode (this should be done once per dashboard): -decluttering_templates: - ld2410: - card: - type: horizontal-stack - cards: - - type: custom:vertical-stack-in-card - cards: - - type: custom:mushroom-entity-card - entity: switch.[[device]]_engineering_mode - name: Preset edit mode - icon_color: pink - layout: horizontal - tap_action: - action: toggle - hold_action: - action: more-info - double_tap_action: - action: none - - type: custom:mushroom-number-card - entity: number.[[device]]_timeout - name: Detection cooldown - layout: horizontal - display_mode: buttons - - type: custom:mushroom-select-card - entity: select.[[device]]_distance_resolution - name: Gate resolution - icon_color: green - layout: horizontal - - type: custom:mushroom-entity-card - entity: switch.[[device]]_control_bluetooth - icon_color: indigo - name: Bluetooth - tap_action: - action: toggle - hold_action: - action: more-info - double_tap_action: - action: none - title: Settings - - type: custom:vertical-stack-in-card - title: Movement - cards: - - type: custom:mushroom-template-card - primary: >- - {{ iif(is_state(entity, 'on'), 'Detected, ' + - states('sensor.[[device]]_moving_distance') + ' cm', 'Not - detected') }} - secondary: '' - icon: mdi:motion-sensor - entity: binary_sensor.[[device]]_moving_target - icon_color: '{% if(is_state(entity, ''on'')) %} red {% endif %}' - layout: horizontal - multiline_secondary: false - - type: custom:mushroom-number-card - entity: number.[[device]]_max_move_distance_gate - name: Max detection gate - display_mode: buttons - icon: mdi:tape-measure - layout: horizontal - secondary_info: none - icon_color: green - - type: custom:mushroom-number-card - entity: number.[[device]]_g0_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 0 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g0_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g1_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 1 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g1_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g2_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 2 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g2_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g3_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 3 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g3_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g4_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 4 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g4_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g5_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 5 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g5_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g6_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 6 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g6_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g7_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 7 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g7_move_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g8_move_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 8 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g8_move_energy - color: orange - - type: custom:vertical-stack-in-card - title: Still - cards: - - type: custom:mushroom-template-card - primary: >- - {{ iif(is_state(entity, 'on'), 'Detected, ' + - states('sensor.[[device]]_still_distance') + ' cm', 'Not - detected') }} - secondary: '' - icon: mdi:motion-sensor - entity: binary_sensor.[[device]]_still_target - icon_color: '{% if(is_state(entity, ''on'')) %} red {% endif %}' - layout: horizontal - multiline_secondary: false - - type: custom:mushroom-number-card - entity: number.[[device]]_max_still_distance_gate - name: Max detection gate - display_mode: buttons - icon: mdi:tape-measure - layout: horizontal - secondary_info: none - icon_color: green - - type: custom:mushroom-number-card - entity: number.[[device]]_g0_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 0 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g0_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g1_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 1 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g1_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g2_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 2 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g2_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g3_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 3 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g3_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g4_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 4 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g4_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g5_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 5 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g5_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g6_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 6 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g6_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g7_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 7 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g7_still_energy - color: orange - - type: custom:mushroom-number-card - entity: number.[[device]]_g8_still_threshold - display_mode: slider - icon_type: none - primary_info: name - secondary_info: state - name: Gate 8 - card_mod: - style: - mushroom-number-value-control$: - mushroom-slider$: | - .slider { - height: 24px !important; - } - .: | - mushroom-number-value-control { - height: 24px; - } - - type: custom:bar-card - direction: right - columns: 1 - height: 16 - positions: - indicator: 'off' - icon: 'off' - name: 'off' - entities: - - entity: sensor.[[device]]_g8_still_energy - color: orange