UI icon indicating copy to clipboard operation
UI copied to clipboard

Card Room instructions on how to get temperature are unclear

Open CaliLuke opened this issue 3 years ago • 4 comments

Describe the bug

I can't figure out how to use the "temperature" option to pass a room temperature to the card. I tried a variety of entities and configurations and it's not working properly.

The docs are unclear: https://ui-lovelace-minimalist.github.io/UI/usage/cards/card_room/#room-entity

To Reproduce Steps to reproduce the behavior:

image

Expected behavior I would like to see the temperature in the tile, a better example would probably suffice.

Screenshots

image

Additional context Add any other context about the problem here.

CaliLuke avatar Feb 24 '22 23:02 CaliLuke

I figured it out by putting the thermostat as the main entity for the card. Still, that should be better documented. What is the "temperature" variable for? where does it go?

CaliLuke avatar Feb 24 '22 23:02 CaliLuke

So if I want to use the tap action for the main card to be a toggle, is there a way to make it not try toggling the temperature sensor?

CaliLuke avatar Feb 24 '22 23:02 CaliLuke

You can edit the card_room template and make something like this:

Line 16:


        if (variables.label_use_temperature && variables.temperature_entity) {
        return (states[`${variables.temperature_entity}`].state) + ('°C');

and in your dashboard:

       variables:
           label_use_temperature: true
           label_use_brightness: false
           temperature_entity: sensor.your_sensor

this way you can show temperature and keep the action for the main entity.

thiagobucca avatar Mar 03 '22 10:03 thiagobucca

So if I want to use the tap action for the main card to be a toggle, is there a way to make it not try toggling the temperature sensor?

Can you set tap_action for the whole card?

sjoshua270 avatar Jul 19 '22 20:07 sjoshua270