Adjusting Sensor Results in Entity Card

I’d like to adjust the humidity sensor based on my own calibration.
What seems to work is, for example to add 2 percent to a humidity sensor:

{{ states('sensor.humidor_sensor_humidity') | float(0) + '2' | float(0) }}

The entity card allows me to click on the card and get the historical data and settings.

cards:
  - type: custom:mushroom-entity-card
    entity: sensor.humidor_sensor_humidity
    name: Humidor Humidity

But I can’t use:

cards:
  - type: custom:mushroom-entity-card
    entity: {{ states('sensor.humidor_sensor_humidity') | float(0) + '2'| float(0) }}
    name: Humidor Temp
    icon_color: yellow

When I create a custom card as below:

  - type: custom:mushroom-template-card
    primary: Humidor Humidity
    secondary: >-
       {{ states('sensor.humidor_sensor_humidity') | float(0) + '2'| float(0) }}

It works great, but no results when I click on the card.

Any ideas would be appreciated!

Use a markdown card to do this in the dashboard or make a template sensor if the calibration is not changed all too often.
If it is changed often then maybe make a template sensor with a calibration from a helper.

You use tab_action, available in the card, when you edit it

Thanks! I just had to specify the entity and selected the More Info as Tap Action.

1 Like