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

Room button badges/actions #16

Open
TRusselo opened this issue Apr 21, 2023 · 6 comments
Open

Room button badges/actions #16

TRusselo opened this issue Apr 21, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@TRusselo
Copy link

TRusselo commented Apr 21, 2023

Room buttons:
show temp / humid

Click actions for room buttons
click : go to room (same as now)
long click : toggle light group for room
double click : more info light group ( dimming color control diag)

Room button
badge icon:
door if door is open (if room has door)
lock if lock is unlocked ( if room has lock)
window if window is open (if room has window)
fan icon if fan is on (if room has fan)
motion if motion detected. ( if room has motion sensor)

badge color:
red if lock
yellow if door
blue if window
blue if fan
green if motion

image

Gives a quick overview of WHICH doors, windows, fans, motion sensors are active.

@TRusselo TRusselo added the enhancement New feature or request label Apr 21, 2023
@DigiLive
Copy link
Collaborator

What about if a room has a door and a lock and a motion detector, etc?

@TRusselo
Copy link
Author

TRusselo commented Apr 22, 2023

Motion is temporary, it can overlay the previous state temporarily.
Door is obviously unlocked if the door is open.

So Door unlocked, show lock,
door open, show door rather than lock
motion detected, show motion temporarily rather than door.
...
fans? actually, i wish there was a "left hand badge" for fan. most of my fans are "tied" to window open automations, so fan means window is open.... FOR ME

a room with window and door and lock....? well i dont have one, so i havent bothered to think about that logic. LOL

@TRusselo
Copy link
Author

TRusselo commented Apr 22, 2023

from a security standpoint:
closing up for the night, i want to see locks and doors, before/over windows & fans (might want to sleep with window open)

so priority low to high:
window (first)
lock over window
door door over lock
motion over door

fan on the newly created "left hand badge"
logic solved.

@TRusselo
Copy link
Author

TRusselo commented Apr 22, 2023

oh.. dont forget the garage door cover badge. RED
so:
window
lock
cover (garage area only, dont care about shades in other rooms)
door
motion

===========
°c 🌡
% 💧

@TRusselo
Copy link
Author

TRusselo commented Apr 22, 2023

An example of a configuration...

Click me ``` type: vertical-stack cards: - type: custom:mushroom-chips-card chips: - type: entity entity: sensor.time double_tap_action: action: navigate navigation_path: /dashboard-mobile/motion - type: entity entity: sensor.dayoftheweek icon: mdi:calendar-week - type: weather entity: weather.fort_mcmurray_pirate_weather show_conditions: true show_temperature: true tap_action: action: navigate navigation_path: /dashboard-mobile/weather hold_action: action: more-info - type: entity entity: person.tristyn name: Tristyn use_entity_picture: true hold_action: action: navigate navigation_path: /dashboard-mobile/location - type: entity entity: person.terry use_entity_picture: true hold_action: action: navigate navigation_path: /dashboard-mobile/location alignment: center - type: conditional conditions: - entity: alarm_control_panel.system state: triggered card: type: alarm-panel states: - arm_home - arm_away entity: alarm_control_panel.system - type: conditional conditions: - entity: sensor.count_zigbee_devices state_not: '31' card: type: markdown content: >-

Zigbee report

Devices: {{ states.sensor.count_zigbee_devices.state }} Online/31 Total - type: conditional conditions: - entity: sensor.count_zwave_devices state_not: 17 Alive/17 Total card: type: markdown content: >

ZWave report

Devices: {{ states.sensor.count_zwave_devices.state }} - type: conditional conditions: - entity: sensor.watchman_missing_entities state_not: '0' card: type: markdown content: >-

Watchman report

Missing Entities: {{ states.sensor.watchman_missing_entities.state }}

{%- for item in state_attr("sensor.watchman_missing_entities", "entities") %}
{{ item.id }} [{{item.state}}] {{item.occurrences.split('/')[-1].split(':')[0]}}
{%- endfor %} - type: custom:battery-state-card title: Low Battery secondary_info: last_updated show_empty: false sort_by_level: asc entities: null filter: include: - name: entity_id value: '*_battery' - name: attributes.device_class value: battery exclude: - name: entity_id value: '*.state' - name: entity_id value: '*body*' - name: entity_id value: '*status*' - name: entity_id value: '*recharge*' - name: entity_id value: '*capacity*' - name: state value: Good - name: state value: Unavailable - name: state value: Unknown - name: state value: STATUS_GOOD - name: state value: 15 operator: '>' - name: state value: 'Off' - name: state value: 'off' - type: horizontal-stack cards: - type: custom:mushroom-template-card primary: House secondary: '' icon: mdi:home icon_color: blue multiline_secondary: false layout: vertical fill_container: false tap_action: action: navigate navigation_path: /dashboard-mobile/devices - type: custom:mushroom-template-card primary: Speakers secondary: '' icon: mdi:speaker icon_color: amber multiline_secondary: false layout: vertical tap_action: action: navigate navigation_path: /dashboard-mobile/speakers - type: custom:mushroom-template-card primary: Security secondary: '' icon: mdi:shield layout: vertical tap_action: action: navigate navigation_path: /dashboard-mobile/alarm icon_color: |- {% if is_state('alarm_control_panel.system', 'disarmed') %} green {% elif is_state('alarm_control_panel.system', 'armed_home') %} yellow {% elif is_state('alarm_control_panel.system', 'armed_away') %} orange {% elif is_state('alarm_control_panel.system', 'triggered') %} red {% endif %} hold_action: action: more-info entity: alarm_control_panel.system - type: horizontal-stack cards: - type: custom:mushroom-template-card primary: Locks secondary: >- {% if expand(state_attr('lock.exterior_locks', 'entity_id'))| selectattr('state','eq','unlocked')|map(attribute='entity_id')|list|count > 0 %}
      {{expand(state_attr('lock.exterior_locks', 'entity_id'))|
      selectattr('state','eq','unlocked')|map(attribute='entity_id')|list|count}}

      {% else %}

      -

      {% endif %}
    fill_container: true
    icon: |-
      {% if is_state('lock.exterior_locks', 'unlocked') %}
      mdi:lock-open
      {% elif is_state('lock.exterior_locks', 'locked') %}
      mdi:lock
      {% endif %} 
    entity: lock.exterior_locks
    layout: vertical
    tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/locks
    hold_action:
      action: toggle
    double_tap_action:
      action: more-info
    icon_color: |-
      {% if is_state('lock.exterior_locks', 'unlocked') %}
      red
      {% elif is_state('lock.exterior_locks', 'locked') %}
      green
      {% endif %} 
    badge_color: ''
  - type: custom:mushroom-template-card
    primary: Doors
    secondary: >-
      {% if expand(state_attr('binary_sensor.exterior_house_doors',
      'entity_id'))|
      selectattr('state','eq','on')|map(attribute='entity_id')|list|count >
      0 %}

      {{expand(state_attr('binary_sensor.exterior_house_doors',
      'entity_id'))|
      selectattr('state','eq','on')|map(attribute='entity_id')|list|count}}

      {% else %}

      -

      {% endif %}
    fill_container: true
    icon: |-
      {% if is_state('binary_sensor.exterior_house_doors', 'on') %}
      mdi:door-open
      {% elif is_state('binary_sensor.exterior_house_doors', 'off') %}
      mdi:door
      {% endif %} 
    entity: binary_sensor.exterior_house_doors
    layout: vertical
    tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/doors
    hold_action:
      action: more-info
    double_tap_action:
      action: more-info
    icon_color: |-
      {% if is_state('binary_sensor.exterior_house_doors', 'on') %}
      red
      {% elif is_state('binary_sensor.exterior_house_doors', 'off') %}
      green
      {% endif %} 
  - type: custom:mushroom-template-card
    primary: Windows
    secondary: >-
      {% if expand(state_attr('binary_sensor.house_windows', 'entity_id'))|
      selectattr('state','eq','on')|map(attribute='entity_id')|list|count >
      0 %}

      {{expand(state_attr('binary_sensor.house_windows', 'entity_id'))|
      selectattr('state','eq','on')|map(attribute='entity_id')|list|count}}

      {% else %}

      -

      {% endif %}
    fill_container: true
    icon: |-
      {% if is_state('binary_sensor.house_windows', 'on') %}
      mdi:window-open
      {% elif is_state('binary_sensor.house_windows', 'off') %}
      mdi:window-closed
      {% endif %} 
    entity: binary_sensor.house_windows
    layout: vertical
    tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/windows
    hold_action:
      action: more-info
    double_tap_action:
      action: more-info
    icon_color: |-
      {% if is_state('binary_sensor.house_windows', 'on') %}
      yellow
      {% elif is_state('binary_sensor.house_windows', 'off') %}
      green
      {% endif %} 
  - type: custom:mushroom-template-card
    primary: Shades
    secondary: >-
      {% if expand(state_attr('cover.shades', 'entity_id'))|
      selectattr('state','eq','open')|map(attribute='entity_id')|list|count
      > 0 %}

      {{expand(state_attr('cover.shades', 'entity_id'))|
      selectattr('state','eq','open')|map(attribute='entity_id')|list|count}}

      {% else %}

      -

      {% endif %}
    fill_container: true
    icon: |-
      {% if is_state('cover.shades', 'open') %}
      mdi:roller-shade
      {% elif is_state('cover.shades', 'closed') %}
      mdi:roller-shade-closed
      {% endif %} 
    entity: cover.shades
    layout: vertical
    tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/shades
    hold_action:
      action: toggle
    double_tap_action:
      action: more-info
    icon_color: |-
      {% if is_state('cover.shades', 'open') %}
      purple
      {% elif is_state('cover.shades', 'closed') %}
      green
      {% endif %} 
  - type: custom:mushroom-template-card
    primary: Fans
    secondary: >-
      {% if expand(state_attr('fan.fans', 'entity_id'))|
      selectattr('state','eq','on')|map(attribute='entity_id')|list|count >
      0 %}

      {{expand(state_attr('fan.fans', 'entity_id'))|
      selectattr('state','eq','on')|map(attribute='entity_id')|list|count}}

      {% else %}

      -

      {% endif %}
    fill_container: true
    icon: mdi:fan
    layout: vertical
    tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/fans
    hold_action:
      action: toggle
    entity: fan.fans
    icon_color: |-
      {% if is_state('fan.fans', 'on') %}
      blue
      {% endif %} 
    badge_icon: |-
      {% if is_state('binary_sensor.thermostat_fan_mode', 'on') %}
      mdi:fan
      {% elif is_state('switch.diffuser', 'on') %}
      mdi:air-humidifier
      {% endif %} 
    badge_color: |-
      {% if is_state('binary_sensor.thermostat_fan_mode', 'on') %}
      green
      {% elif is_state('switch.diffuser', 'on') %}
      yellow
      {% endif %} 
  - type: custom:mushroom-template-card
    primary: Fireplace
    fill_container: true
    secondary: |-
      {% if is_state('switch.fireplace', 'on') %}
      On
      {% elif is_state('switch.fireplace', 'off') %}
      -
      {% endif %} 
    icon: |-
      {% if is_state('switch.fireplace', 'on') %}
      mdi:fireplace
      {% elif is_state('switch.fireplace', 'off') %}
      mdi:fireplace-off
      {% endif %} 
    entity: switch.fireplace
    layout: vertical
    tap_action:
      action: toggle
    hold_action:
      action: toggle
    double_tap_action:
      action: more-info
    icon_color: |-
      {% if is_state('switch.fireplace', 'on') %}
      red
      {% elif is_state('switch.fireplace', 'off') %}
      green
      {% endif %} 
    badge_color: ''
  • type: conditional
    conditions:
    • entity: vacuum.bitch_vac
      state_not: docked
    • entity: vacuum.bitch_vac
      state_not: unknown
    • entity: vacuum.bitch_vac
      state: Unavailable
      card:
      type: custom:vacuum-card
      entity: vacuum.bitch_vac
      map: camera.bitch_vac_cleaning_map
      view_layout:
      column: 1
  • type: conditional
    conditions:
    • entity: sensor.washer_status
      state_not: Idle
    • entity: sensor.washer_status
      state_not: unknown
      card:
      type: custom:laundry-card
      entity: sensor.washer
  • type: custom:simple-thermostat
    style: |
    ha-card {height: 100%}
    entity: climate.thermostat
    header: false
    decimals: true
    layout:
    step: row
    control: false
  • type: custom:mushroom-title-card
    title: Rooms
    alignment: center
  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Living Room
      secondary: |-
      {{ states('sensor.living_room_motion_sensor_temperature') }} °c 🌡
      {{ states('sensor.thermostat_humidity') }} % 💧
      icon: mdi:sofa
      entity: light.living_room_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/living-room
      hold_action:
      action: toggle
      icon_color: >-
      {% if is_state('light.living_room_lights', 'on') %}

      {{ state_attr("light.living_room_lights", "rgb_color")[0] }} {{
      state_attr("light.living_room_lights", "rgb_color")[1] }}, {{
      state_attr("light.living_room_lights", "rgb_color")[2] }}

      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.living_room_motion_sensor_occupancy',
      'on') %}

      mdi:motion-sensor

      {% elif is_state('binary_sensor.living_room_window_contact', 'on') %}

      mdi:window-open

      {% endif %}
      badge_color: >-
      {% if is_state('binary_sensor.living_room_motion_sensor_occupancy',
      'on') %}

      green

      {% elif is_state('binary_sensor.living_room_window_contact', 'on') %}

      blue

      {% endif %}
      picture: ''

    • type: custom:mushroom-template-card
      primary: Kitchen
      secondary: '{{ states(''sensor.kitchen_motion_temperature'') }} °c 🌡'
      icon: mdi:fridge
      entity: light.kitchen
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/kitchen
      hold_action:
      action: toggle
      icon_color: >-
      {% if is_state('light.kitchen', 'on') %}

      {{ state_attr("light.kitchen_lights", "rgb_color")[0] }} {{
      state_attr("light.kitchen_lights", "rgb_color")[1] }}, {{
      state_attr("light.kitchen_lights", "rgb_color")[2] }}

      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('binary_sensor.kitchen_motion_occupancy', 'on') %}
      mdi:motion-sensor
      {% elif is_state('binary_sensor.back_door', 'on') %}
      mdi:door-open
      {% elif is_state('binary_sensor.back_door_latch_contact', 'on') %}
      mdi:lock-off
      {% endif %}
      badge_color: |-
      {% if is_state('binary_sensor.kitchen_motion_occupancy', 'on') %}
      green
      {% elif is_state('binary_sensor.back_door', 'on') %}
      blue
      {% elif is_state('binary_sensor.back_door_latch_contact', 'on') %}
      red
      {% endif %}

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Front Yard
      secondary: |-
      {{ states('sensor.openweathermap_temperature') }} °c 🌡
      {{ states('sensor.openweathermap_humidity') }} % 💧
      icon: mdi:pine-tree
      entity: light.front_yard_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/front-yard
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.front_yard_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('binary_sensor.blueiris_front_yard_motion', 'on') %}
      mdi:motion-sensor
      {% endif %}
      badge_color: green
    • type: custom:mushroom-template-card
      primary: Back Deck
      secondary: |-
      {{ states('sensor.openweathermap_temperature') }} °c 🌡
      {{ states('sensor.openweathermap_humidity') }} % 💧
      icon: mdi:umbrella-beach
      entity: light.back_deck
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/outside
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.back_deck', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('binary_sensor.blueiris_back_deck_motion', 'on') %}
      mdi:motion-sensor
      {% endif %}
      badge_color: green
  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Garage
      secondary: |
      {{ states('sensor.garage_house_door_temperature') }} °c 🌡
      icon: mdi:garage
      entity: light.garage_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/garage
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.garage_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('binary_sensor.blueiris_garage_camera_motion', 'on') %}
      mdi:motion-sensor
      {% elif is_state('binary_sensor.garage_side_door', 'on') %}
      mdi:door-open
      {% elif is_state('binary_sensor.garage_overhead_door', 'on') %}
      mdi:garage-open
      {% elif is_state('lock.garage_side_deadbolt', 'unlocked') %}
      mdi:lock-off
      {% endif %}
      badge_color: |-
      {% if is_state('binary_sensor.blueiris_garage_camera_motion', 'on') %}
      green
      {% elif is_state('binary_sensor.garage_side_door', 'on') %}
      red
      {% elif is_state('binary_sensor.garage_overhead_door', 'on') %}
      red
      {% elif is_state('lock.garage_side_deadbolt', 'unlocked') %}
      red
      {% endif %}
    • type: custom:mushroom-template-card
      primary: Basement
      secondary: |-
      {{ states('sensor.basement_ambient_temperature') }} °c 🌡
      {{ states('sensor.basement_ambient_humidity') }} % 💧
      icon: mdi:dumbbell
      entity: light.basement_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/basement
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.basement_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('binary_sensor.basement_motion_detector', 'on') %}
      mdi:motion-sensor
      {% elif is_state('binary_sensor.basement_window_1', 'on') %}
      mdi:window-open
      {% elif is_state('binary_sensor.basement_window', 'on') %}
      mdi:window-open
      {% endif %}
      badge_color: |-
      {% if is_state('binary_sensor.basement_motion_detector', 'on') %}
      green
      {% elif is_state('binary_sensor.basement_window_1', 'on') %}
      blue
      {% elif is_state('binary_sensor.basement_window', 'on') %}
      blue
      {% endif %}
  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Entryway
      secondary: |-
      {{ states('sensor.entryway_motion_sensor_temperature') }} °c 🌡
      {{ states('sensor.thermostat_humidity') }} % 💧
      icon: mdi:door-open
      entity: light.entryway_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/hallways
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.entryway_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.entryway_motion_sensor_occupancy', 'on')
      %}

      mdi:motion-sensor

      {% elif is_state('binary_sensor.front_door', 'on') %}

      mdi:door-open

      {% elif is_state('lock.front_deadbolt', 'unlocked') %}

      mdi:lock-off

      {% endif %}
      badge_color: >-
      {% if is_state('binary_sensor.entryway_motion_sensor_occupancy', 'on')
      %}

      green

      {% elif is_state('binary_sensor.front_door', 'on') %}

      blue

      {% elif is_state('lock.front_deadbolt', 'unlocked') %}

      red

      {% endif %}

    • type: custom:mushroom-template-card
      primary: Bathroom 3
      secondary: ''
      icon: mdi:toilet
      entity: switch.bathroom_3_lights
      tap_action:
      action: toggle
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('switch.bathroom_3_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: ''
      badge_color: ''

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Bedroom 2
      secondary: >-
      {{ states('sensor.bedroom_2_temp_humidity_sensor_temperature') }} °c
      🌡

      {{
      states('sensor.bedroom_2_temp_humidity_sensor_relative_humidity_measurement')
      }} % 💧
      icon: mdi:bed-double
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/bedroom
      hold_action:
      action: toggle
      icon_color: >-
      {% if is_state('light.bedroom_lights', 'on') %}

      {{ state_attr("light.bedroom_lights", "rgb_color")[0] }} {{
      state_attr("light.bedroom_lights", "rgb_color")[1] }}, {{
      state_attr("light.bedroom_lights", "rgb_color")[2] }}

      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.bedroom_2_motion_sensor_occupancy',
      'on') %}

      mdi:motion-sensor

      {% elif is_state('binary_sensor.bedroom_2_window_contact', 'on') %}

      mdi:window-open

      {% endif %}
      badge_color: >-
      {% if is_state('binary_sensor.bedroom_2_motion_sensor_occupancy',
      'on') %}

      green

      {% elif is_state('binary_sensor.bedroom_2_window_contact', 'on') %}

      blue

      {% endif %}
      entity: light.bedroom_lights

    • type: custom:mushroom-template-card
      primary: Den
      secondary: '{{ states(''sensor.den_motion_temperature'') }} °c 🌡'
      icon: mdi:sofa-single
      entity: light.den_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/den
      hold_action:
      action: toggle
      icon_color: >-
      {% if is_state('light.den_lights', 'on') %}

      {{ state_attr("light.den_lights", "rgb_color")[0] }} {{
      state_attr("light.den_lights", "rgb_color")[1] }}, {{
      state_attr("light.den_lights", "rgb_color")[2] }}

      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('binary_sensor.den_motion_occupancy', 'on') %}
      mdi:motion-sensor
      {% elif is_state('binary_sensor.den_window_contact', 'on') %}
      mdi:window-open
      {% endif %}
      badge_color: |-
      {% if is_state('binary_sensor.den_motion_occupancy', 'on') %}
      green
      {% elif is_state('binary_sensor.den_window_contact', 'on') %}
      blue
      {% endif %}

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Master Bedroom
      secondary: |-
      {{ states('sensor.master_bedroom_button_temperature') }} °c 🌡
      {{ states('sensor.master_bedroom_temp_sensor_humidity') }} % 💧
      icon: mdi:bed-king
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/master-bedroom
      hold_action:
      action: toggle
      icon_color: >-
      {% if is_state('light.master_bedroom_lights', 'on') %}

      {{ state_attr("light.master_bedroom_lights", "rgb_color")[0] }} {{
      state_attr("light.master_bedroom_lights", "rgb_color")[1] }}, {{
      state_attr("light.master_bedroom_lights", "rgb_color")[2] }}

      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.master_bedroom_motion_motion', 'on') %}

      mdi:motion-sensor

      {% elif is_state('binary_sensor.master_bedroom_window_contact', 'on')
      %}

      mdi:window-open

      {% endif %}
      badge_color: >-
      {% if is_state('binary_sensor.master_bedroom_motion_motion', 'on') %}

      green

      {% elif is_state('binary_sensor.master_bedroom_window_contact', 'on')
      %}

      blue

      {% endif %}
      entity: light.master_bedroom_lights

    • type: custom:mushroom-template-card
      primary: Master Bathroom
      secondary: '{{ states(''sensor.master_bathroom_motion_sensor_temperature'') }} °c 🌡'
      icon: mdi:shower
      entity: light.master_bathroom_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/master-bedroom
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.master_bathroom_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.master_bathroom_motion_sensor_motion',
      'on') %}

      mdi:motion-sensor

      {% elif is_state('binary_sensor.master_bathroom_window_contact', 'on')
      %}

      mdi:window-open

      {% endif %}
      badge_color: >-
      {% if is_state('binary_sensor.master_bathroom_motion_sensor_motion',
      'on') %}

      green

      {% elif is_state('binary_sensor.master_bathroom_window_contact', 'on')
      %}

      blue

      {% endif %}

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Upstairs
      secondary: |
      {{ states('sensor.upstairs_motion_sensor_temperature') }} °c 🌡
      icon: mdi:stairs-up
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/hallways
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.upstairs_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.upstairs_motion_sensor_occupancy', 'on')
      %}

      mdi:motion-sensor

      {% endif %}
      badge_color: green
      entity: light.upstairs_lights

    • type: custom:mushroom-template-card
      primary: Downstairs
      secondary: '{{ states(''sensor.downstairs_motion_sensor_temperature'') }} °c 🌡'
      icon: mdi:stairs-down
      entity: light.downstairs_lights
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/hallways
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.downstairs_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: false
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: >-
      {% if is_state('binary_sensor.downstairs_motion_sensor_motion', 'on')
      %}

      mdi:motion-sensor

      {% elif is_state('binary_sensor.garage_house_door_contact', 'on') %}

      mdi:door-open

      {% endif %}
      badge_color: >-
      {% if is_state('binary_sensor.downstairs_motion_sensor_motion', 'on')
      %}

      green

      {% elif is_state('binary_sensor.garage_house_door_contact', 'on') %}

      blue

      {% endif %}

  • type: horizontal-stack
    cards:
    • type: custom:mushroom-template-card
      primary: Bathroom 2
      secondary: |
      {{ states('sensor.bathroom_2_motion_sensor_temperature') }} °c 🌡
      Fan {{ states('fan.bath_fan') }}
      icon: mdi:shower-head
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/bathroom
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.bathroom_2_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: true
      fill_container: true
      double_tap_action:
      action: call-service
      service: fan.toggle
      target:
      entity_id: fan.bath_fan
      data: {}
      badge_icon: >-
      {% if is_state('binary_sensor.bathroom_2_motion_sensor_motion', 'on')
      %}

      mdi:motion-sensor

      {% endif %}
      badge_color: green
      entity: light.bathroom_2_lights

    • type: custom:mushroom-template-card
      primary: Washing Machine
      secondary: '{{ states(''sensor.washer'') }}'
      icon: mdi:washing-machine
      entity: sensor.washer
      tap_action:
      action: navigate
      navigation_path: /dashboard-mobile/bathroom
      hold_action:
      action: toggle
      icon_color: |-
      {% if is_state('light.downstairs_lights', 'on') %}
      orange
      {% endif %}
      multiline_secondary: true
      fill_container: true
      double_tap_action:
      action: more-info
      badge_icon: |-
      {% if is_state('sensor.washer_status', 'Running') %}
      mdi:washing-machine-alert
      {% endif %}
      badge_color: green

<details>

@AalianKhan
Copy link
Owner

Hey,
I think the motion sensor should be added to the secondary information as it is a sensor that tells me general information.
For me, I rather know if a door is open than motion.
image

For fans, we already have a chip and view that shows all the fans running so adding it to the room card seems redundant.

@DigiLive DigiLive linked a pull request Oct 24, 2023 that will close this issue
@DigiLive DigiLive changed the title [FR] Room button badges/actions Room button badges/actions Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants