Adapt Sensor output

I have a problem with the output of my Smappee Sensors.
For water the sensor counts the number of clicks in my water meter.
The meter clicks every 0.5l and in HASS.IO it counts as 1.
Same for my gaz meter. meter counts every 0.01 m³ but hass shows this as 1m³.
You can image my usage is through the roof :slight_smile:

Is there a way to adapt these sensors?
Currently I was thinking of creating a template sensor that divides the smappee sensor by 2.
Is this the best way to go?

thanks for any input.

make template sensors that divide by the appropriate ammount.

sensor:
  - platform: template
    sensors:
      water_meter:
        friendly_name: Water Meter
        value_template: "{{ states('sensor.<water_meter>') | int / 2 }}"
        unit_of_measure: I
      gas_meter:
        friendly_name: Gas Meter
        value_template: "{{ states('sensor.<gas_meter>') | int / 100 }}"
        unit_of_measure: m³

Just replace <water_meter> and <gas_meter> with the appropriate object id.

That did the trick! Thanks for pointing me in the right direction!
Made some adjustments for unit_of_measurment.

- platform: template
  sensors:
    water_meter:
      friendly_name: Water Meter
      value_template: "{{ states('sensor.smappee_ons_huisje_water_sensor_1') | int / 2 }}"
      unit_of_measurement: L
    gas_meter:
      friendly_name: Gas Meter
      value_template: "{{ states('sensor.smappee_ons_huisje_water_sensor_2') | int / 100 }}"
      unit_of_measurement: m³
1 Like