Can't get filter sensor to work


I’m trying to create a filter sensor. It looks like this:

  • platform: filter
    name: filtrert_watt_vaskerom
    entity_id: sensor.watt_vaskerom3
    • filter: range
      lower_bound: 0
      upper_bound: 270

But when I restart hassio, I get this error message, and no sensor is created!
In an earlier version I had a precision parameter that gave an error message, but that was for another sensor (that didn’t work) that is long gone.
What am I doing wrong?

2018-12-18 18:42:34 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform filter
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.6/asyncio/”, line 358, in wait_for
return fut.result()
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/”, line 124, in async_setup_platform
for _filter in config[CONF_FILTERS]]
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/”, line 124, in
for _filter in config[CONF_FILTERS]]
TypeError: init() got an unexpected keyword argument ‘precision’