Hi Team.
I am using the custom button card quite heavily. Is it possible to add a temperature value? For example i have a card that opens a Kitchen page but i would like to include the temperature of that room on the button card,
Hi Team.
I am using the custom button card quite heavily. Is it possible to add a temperature value? For example i have a card that opens a Kitchen page but i would like to include the temperature of that room on the button card,
Hi,
So i hve cobbled this together from a few places. Anyone know how to add the Unit of Measurement and display °C next to the temp?
type: custom:button-card
size: 16%
icon: mdi:desktop-classic
show_state: false
show_name: false
label: Mancave
show_label: true
tap_action:
action: navigate
navigation_path: /mcfarlane-towers-ios/mancave
styles:
grid:
- grid-template-columns: 100%
- grid-template-rows: 1fr
- grid-template-areas: '"i" "l" "temperature"'
card:
- border: 2px solid rgba(0,150,255, .5)
- background-color: rgba(0,0,0,.2)
icon:
- color: rgba(138, 121, 93, 1)
custom_fields:
temperature: |
[[[ return states['sensor.motion_sensor_office_01_temperature' ].state; ]]]
state:
- value: 'off'
styles:
icon:
- color: rgba(105,105,105,1)
- value: 'on'
styles:
card:
- filter: opacity(100%)
icon:
- color: rgba(0,150,255, 1)
got it
[[[ return states['sensor.motion_sensor_office_01_temperature' ].state + ' °C'; ]]]
Thanks! Works for me but trying to center it now.
How did you go with your centering on this? Looking to do the same