UI-Lovelace-Minimalist / UI

UI-Lovelace-Minimalist is a "theme" for HomeAssistant
https://ui-lovelace-minimalist.github.io/UI/
Other
1.65k stars 433 forks source link

Temperature not showing in card_room #1411

Closed Norkl closed 11 months ago

Norkl commented 11 months ago

Describe the bug Temperature is not showing in the room cards. In the documentation for label_use_temperature it says _"Define whether the label should show the current room temperature. The temperature should be provide by either a temperatureor current_temperatureattribute or by the entity state."_ but I fail to understand where I need to specify my temperature sensors.

The sensor I have is the "Aqara temperature and humidity sensor" which has the sensor name sensor.lumi_lumi_weather_temperature.

To Reproduce Steps to reproduce the behavior:

views/home.yaml ```yaml title: "Home" path: "home" theme: "minimalist-desktop" cards: - type: "custom:button-card" template: "card_esh_welcome" triggers_update: "input_boolean.minimalist_dropdown" variables: ulm_card_esh_welcome_collapse: input_boolean.minimalist_dropdown ulm_weather: "weather.smhi_home" entity_1: nav: "berkel" icon: "mdi:home" name: "Home" color: "blue" entity_2: nav: "lights" icon: "mdi:lightbulb" name: "Lights" color: "yellow" entity_3: nav: "network" icon: "mdi:network" name: Network color: "green" - type: horizontal-stack cards: - type: "custom:button-card" template: card_person entity: person.norkel variables: ulm_card_person_entity: person.norkel ulm_card_person_use_entity_picture: true ulm_card_person_battery: sensor.pixel_7_battery_level - type: "custom:button-card" template: card_title name: Rooms - type: horizontal-stack cards: - type: "custom:button-card" template: - card_room name: Noffice entity: light.noffice icon: mdi:desktop-classic tap_action: action: navigate navigation_path: "noffice" variables: label_use_temperature: true label_use_brightness: false entity_1: entity_id: light.office templates: - yellow_on tap_action: action: toggle entity_2: entity_id: sensor.lumi_lumi_weather_temperature - type: "custom:button-card" template: - card_room name: Bedroom entity: light.bedroom icon: mdi:bed tap_action: action: navigate navigation_path: "bedroom" variables: label_use_temperature: true label_use_brightness: false entity_1: entity_id: light.bedroom templates: - yellow_on tap_action: action: toggle entity_2: entity_id: sensor.lumi_lumi_weather_temperature ```

Expected behavior Temperature for each room showing underneath room titles as it's shown in https://github.com/UI-Lovelace-Minimalist/UI/blob/main/docs/usage/cards/card_room.md : image

Screenshots Here is what my dashboard looks like with the above configuration: image

Related Card Config Add the card config from ui-lovelace.yaml with the related problem

ui-lovelace.yaml ```yaml --- button_card_templates: !include_dir_merge_named "../../custom_components/ui_lovelace_minimalist/__ui_minimalist__/ulm_templates/" title: "Minimalist" theme: "minimalist-desktop" background: "var(--background-image)" # views: !include_dir_merge_list "views/" views: - !include views/home.yaml - !include views/noffice.yaml ```
basbruss commented 11 months ago

To use temperature you will need a climate entity as main entity for the card

Norkl commented 11 months ago

Thanks for the quick response!

Aaah I see now I used the light as the main entity.

Solved by changing the main entity to the temp sensor:

  - type: horizontal-stack
    cards:
      - type: "custom:button-card"
        template:
          - card_room
        name: Noffice
        entity: sensor.lumi_lumi_weather_temperature
        icon: mdi:desktop-classic
        tap_action:
          action: navigate
          navigation_path: "noffice"
[...]

Thank you!