#Rounding numbers with custom style

1 messages · Page 1 of 1 (latest)

swift flare
#

I added multiple attributes to a Bubble Card using a custom style, however I'm struggling to get this to round it to a whole number, any advice would be appreciated:
${card.querySelector('.bubble-state').innerText = hass.states['sensor.garage_thermostat_current_temperature'].state + " °F · " + hass.states['sensor.garage_thermostat_current_humidity'].state + " %"}

languid leaf
#

Try this:

Number.parseInt(hass.states['sensor.garage_thermostat_current_temperature'].state)