🌻 Lovelace UI • Minimalist

There will definitely be no ETA. It’s ready when it’s ready. :wink:
You can always follow the current work status on GitHub.
I think @schumijo or bravo can show something there or here when they feel ready.

Did not yet update (are there any instructions how to?)
But I have issues with the cover template since updated to core-2021.12.1.

        - type: 'custom:button-card'
          template: 
            - card_cover_with_buttons
          variables:
            ulm_card_cover_with_buttons_name: "Schlafzimmer klein"
            ulm_card_cover_with_buttons_entity: "cover.shelly_shsw_25_c463ba"
        - type: custom:button-card
          template: edge

Does not work anymore and produces this:
image
anyone else experiencing this issue? Or did I just miss it here

Sorry for the dumb question but how do I set up the chips presence detection sensor?
I have zones for when we are at home or work and they are working fine.

  - title: Home
    cards:
      - type: vertical-stack
        cards:
          - type: "custom:button-card"
            template: card_person
            variables:
              ulm_card_person_entity: person.kim_lidberg
              ulm_card_person_use_entity_picture: true
              ulm_card_person_zone1: Work
              ulm_card_person_zone2: Home
          - type: "custom:button-card"
            template: card_person
            variables:
              ulm_card_person_entity: person.nattz_lidberg
              ulm_card_person_use_entity_picture: true
              ulm_card_person_zone1: Work
              ulm_card_person_zone2: Home
          - type: 'custom:button-card'
            template: chip_presence_detection
            variables:
              ulm_chip_presence_counter_residents: sensor.my_residents_counter
              ulm_chip_presence_counter_guests: sensor.my_guests_counter

Will give me this:

What am I missing?

Is it possible to tweak this card to work with an XBOX instead? :slight_smile:

There is currently a bug with custom zones on the person card.

Should be fixed with next releas

Think we are talking about different things?

I don’t have the sensor

sensor.my_residents_counter

and I’m not sure how to set it up?
Loads of people are using the counter but I can’t seem to get it to work… :slight_smile:

Ah, yes I must have read that wrong.
You just need a template sensor that counts the desired people. For example like this:

- platform: template
    sensors:
      persons_at_home:
        friendly_name: 'Personen Anwesend'
        value_template: >
          {{ [states.person.simon, states.person.lisa]
              | selectattr('state', '==', 'home') | list | count }}
1 Like

And I add that to my configuration.yaml?

Would love to see code for this one :slight_smile:

For example:

device_tracker:
  - platform: template
    senors:
      persons_at_home:
        friendly_name: 'People Present'
        value_template: >
          {{ [states.person.kim_lidberg, states.person.nattz_lidberg]
              | selectattr('state', '==', 'home') | list | count }}

This gives me:
image

Edit: I’m so dumb. Didn’t think about adding sensor: instead of device_tracker.

1 Like

I did it like this…

sensor:
  - platform: template
    sensors:
      my_residents_counter:
        friendly_name: "my_residents_counter"
        value_template: >-
          {{ [states.person.1, states.person.2]
             | selectattr('state', 'eq', 'home')
             | list | count }}
1 Like

I was so dumb, didn’t even add sensor: at first. Thank you Sir! :heart_eyes:

2 Likes

That will be no problem, i only don’t own a XBOX so i have no idea what states it have etc. Can you provide me some info about the states and attributes. Thx

states.person.1 & 2 I could assume I change to state.person.kim_lidberg and state.person.nattz_lidberg right?

yes, like in my example :wink:

1 Like

And this is my code:

sensor:
  - platform: integration
    source: sensor.energy
    name: Server_Energy
    unit_prefix: k
    unit_time: h
    round: 1

  - platform: integration
    source: sensor.office_consumption
    name: Office_Energy
    unit_prefix: k
    unit_time: h
    round: 1

  - platform: time_date
    display_options:
      - "time"

  - platform: template
    sensors:
      my_residents_counter:
        friendly_name: "my_residents_counter"
        value_template: >-
          {{ [states.kim_lidberg, states.nattz_lidberg]
          | selectattr('state', 'eq', 'home')
          | list | count }}

button_card_templates: !include_dir_merge_named minimalist-templates/
sensor: !include sensor.yaml
views:
  - title: Home
    cards:
      - type: horizontal-stack
        cards:
          - type: 'custom:button-card'
            template: chip_icon_state
            variables:
              ulm_chip_icon_state_icon: '🛏️'
              ulm_chip_icon_state_entity: sensor.lumi_lumi_weather_temperature
          - type: 'custom:button-card'
            template: chip_icon_state
            variables:
              ulm_chip_icon_state_icon: '🛋️'
              ulm_chip_icon_state_entity: sensor.lumi_lumi_weather_b3efd306_temperature
          - type: 'custom:button-card'
            template: chip_presence_detection
            variables:
              ulm_chip_presence_counter_residents: sensor.my_residents_counter

So sorry if this is easy, but can’t get it right!

If this is a sensor.yaml that’s included in cofiguration by !include sensor.yaml - I think you have to remove «sensor:» at the start of the document

EDIT: Saw now that it’s probably in the lovelace yaml, but should be removed anyway

Alright! Made it a little better! Thanks for the help. But my resident counter is still not working.

Mobile view gives me this on desktop and phone:

My lovelace-minimalist.yaml:

button_card_templates: !include_dir_merge_named minimalist-templates/
sensor: !include sensor.yaml
views:
  - title: Home
    cards:
      - type: horizontal-stack
        cards:
          - type: 'custom:button-card'
            template: chip_icon_state
            variables:
              ulm_chip_icon_state_icon: '🛏️'
              ulm_chip_icon_state_entity: sensor.lumi_lumi_weather_temperature
          - type: 'custom:button-card'
            template: chip_icon_state
            variables:
              ulm_chip_icon_state_icon: '🛋️'
              ulm_chip_icon_state_entity: sensor.lumi_lumi_weather_b3efd306_temperature
          - type: 'custom:button-card'
            template: chip_presence_detection
            variables:
              ulm_chip_presence_counter_residents: sensor.my_residents_counter
      - type: vertical-stack
        cards:
          - type: "custom:button-card"
            template: card_person
            variables:
              ulm_card_person_entity: person.kim_lidberg
              ulm_card_person_use_entity_picture: true
              ulm_card_person_zone1: Work
              ulm_card_person_zone2: Home
          - type: "custom:button-card"
            template: card_person
            variables:
              ulm_card_person_entity: person.nattz_lidberg
              ulm_card_person_use_entity_picture: true
              ulm_card_person_zone1: Work
              ulm_card_person_zone2: Home
      - type: "custom:button-card"
        template: card_binary_sensor_alert
        variables:
          - ulm_card_binary_sensor_alert: true
        entity: binary_sensor.lumi_lumi_sensor_magnet_aq2_on_off
        show_last_changed: true
      - type: "custom:button-card"
        template: card_power_outlet
        entity: switch.coffe_power_plug_on_off
        name: Coffe Switch
      - type: "custom:button-card"
        template: card_light_slider_collapse
        variables:
          ulm_card_light_slider_collapse_name: Office Light
        entity: light.yeelight_color4_0x123d6657
      - type: "custom:button-card"
        template: card_light_slider_collapse
        variables:
          ulm_card_light_slider_collapse_name: TV Light
        entity: light.yeelight_stripe_0x12c6a5b7
      - type: "custom:button-card"
        template: card_light_slider_collapse
        variables:
          ulm_card_light_slider_collapse_name: Sofa Lamp
        entity: light.yeelight_color4_0x10e3466c
      - type: "custom:button-card"
        template: card_light_slider_collapse
        entity: light.yeelight_color4_0x1259234d
        variables:
          ulm_card_light_slider_collapse_name: Living Room
      - type: "custom:button-card"
        template: card_media_player
        entity: media_player.spotify_nautiqu3
        name: Spotify
      - type: "custom:button-card"
        template: card_generic
        entity: sensor.garbage_collection
      - type: custom:fan-xiaomi
        entity: fan.xiaomi_smart_fan
        name: Livingroom Fan
        disable_animation: false
        platform: xiaomi_miio_fan
  ##Cameras###
  - title: CCTV
    path: cctv
    icon: mdi:cctv
    badges: []
    cards:
      - type: 'custom:button-card'
        template: chip_back
        variables:
          ulm_chip_back_path: /lovelace-minimalist/0
      - type: picture-entity
        image: https://demo.home-assistant.io/stub_config/bedroom.png
        name: Bedroom
        camera_image: camera.bedroom_mainstream
        entity: camera.bedroom_mainstream
        camera_view: live
      - type: picture-entity
        image: https://demo.home-assistant.io/stub_config/bedroom.png
        name: Kitchen
        camera_image: camera.kitchen_mainstream
        entity: camera.kitchen_mainstream
        camera_view: live
      - type: picture-entity
        image: https://demo.home-assistant.io/stub_config/bedroom.png
        name: Driveway
        camera_image: camera.driveway_mainstream
        entity: camera.driveway_mainstream
        camera_view: live
  ##Sensors###
  - title: Sensors
    path: sensors
    icon: mdi:home-analytics
    badges: []
    cards:
      - type: custom:battery-state-card
        title: Battery levels
        entities:
          - sensor.lumi_lumi_sensor_magnet_aq2_power
          - sensor.ikea_of_sweden_tradfri_on_off_switch_368319fe_power
          - sensor.lumi_lumi_sensor_motion_aq2_power
          - sensor.lumi_lumi_weather_power
          - sensor.lumi_lumi_weather_b3efd306_power
          - sensor.lumi_lumi_vibration_aq1_power
      - type: entities
        entities:
          - entity: binary_sensor.updater
        title: Binary sensors
      - type: entities
        entities:
          - entity: sensor.current
          - entity: sensor.energy
          - entity: sensor.voltage
          - entity: sensor.office_current
          - entity: sensor.office_consumption
          - entity: sensor.office_voltage
        title: Energy Status
      - title: Energy distribution today
        type: energy-distribution
        link_dashboard: true
      - type: custom:garbage-collection-card
        entity: sensor.garbage_collection

Conf.yaml:

default_config:

lovelace:
  mode: storage
  # Add yaml dashboards
  dashboards:
    lovelace-minimalist:
      mode: yaml
      title: Minimalist
      icon: mdi:script
      show_in_sidebar: true
      filename: lovelace-minimalist.yaml

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
sensor: !include sensor.yaml

frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js
    - /hacsfiles/button-card/button-card.js
    - /hacsfiles/light-entity-card/light-entity-card.js
    - /hacsfiles/my-cards/my-cards.js
    - /hacsfiles/slider-button-card/slider-button-card.js
    - /hacsfiles/spotify-card/spotify-card.js
    - /hacsfiles/vertical-stack-in-card/vertical-stack-in-card.js

# Text to speech
tts:
  - platform: google_translate
    language: en
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300
    base_url: https://zoomie.duckdns.org:8123
    service_name: google_say


http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

media_source:

fan:
  - platform: xiaomi_miio_fan
    name: Xiaomi Smart Fan
    host: 192.168.170.215
    token: !secret fan

spotify:
  client_id: !secret Spotify_Client
  client_secret: !secret Spotify_Secret

spotcast:
  sp_dc: !secret sp_dc
  sp_key: !secret sp_key

climate:
  - platform: xiaomi_miio_airconditioningcompanion
    name: AC Bedroom
    host: 192.168.170.233
    token: !secret AC_Bedroom
    target_sensor: sensor.temperature_158d0001f53706
    scan_interval: 60
  - platform: xiaomi_miio_airconditioningcompanion
    name: AC Livingroom
    host: 192.168.170.192
    token: !secret AC_Livingroom
    target_sensor: sensor.temperature_158d0001f53706
    scan_interval: 60

google_assistant:
  project_id: nest-home-assistant-8952e
  service_account: !include SERVICE_ACCOUNT.json
  report_state: true

input_boolean:
  wakeup_enabled:
    name: "Wake-up lights"
    initial: on
    icon: mdi:theme-light-dark
  wakeup_weekend:
    name: "Enable Wake-up on weekends"
    initial: off # I disable the system on default on weekends
    icon: mdi:calendar-blank

input_datetime:
  wakeup_time:
    name: "Start lights at"
    has_time: true
    has_date: false


Sensor.yaml

  - platform: integration
    source: sensor.energy
    name: Server_Energy
    unit_prefix: k
    unit_time: h
    round: 1

  - platform: integration
    source: sensor.office_consumption
    name: Office_Energy
    unit_prefix: k
    unit_time: h
    round: 1

  - platform: time_date
    display_options:
      - "time"

  - platform: template
    sensors:
      my_residents_counter:
        friendly_name: "my_residents_counter"
        value_template: >-
          {{ [states.kim_lidberg, states.nattz_lidberg]
          | selectattr('state', 'eq', 'home')
          | list | count }}

It’s because you don’t have a guest counter I guess.


chip_presence_detection:
  template: chips
  triggers_update:
    - "[[[ variables.ulm_chip_presence_counter_residents ]]]"
    - "[[[ variables.ulm_chip_presence_counter_guests ]]]"
  label: |
    [[[
      var guests = states[variables.ulm_chip_presence_counter_guests].state ? ' / ' + states[variables.ulm_chip_presence_counter_guests].state : '';
      return '🏠 ' +  states[variables.ulm_chip_presence_counter_residents].state + guests;
    ]]]

You could probably edit the template, or just make a sensor that says 0

If edit; try this:




chip_presence_detection:
  template: chips
  triggers_update:
    - "[[[ variables.ulm_chip_presence_counter_residents ]]]"
  label: |
    [[[
      return '🏠 ' +  states[variables.ulm_chip_presence_counter_residents].state;
    ]]]


3 Likes

It’s because you have no guest counter

@Vintage89
You are using an old template. :wink:
Current templates should have an:

triggers_update: all

instead of entity triggers

1 Like