Create Threshold Sensor logs errors

I get this message:
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py”, line 237, in async_handle
handler(self.hass, self, schema(msg))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/threshold/config_flow.py”, line 149, in ws_start_preview
connection.subscriptions[msg[“id”]] = preview_entity.async_start_preview(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
async_preview_updated
^^^^^^^^^^^^^^^^^^^^^
)
^
File “/usr/src/homeassistant/homeassistant/components/threshold/binary_sensor.py”, line 350, in async_start_preview
self._async_setup_sensor()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File “/usr/src/homeassistant/homeassistant/components/threshold/binary_sensor.py”, line 252, in _async_setup_sensor
_update_sensor_state()
~~~~~~~~~~~~~~~~~~~~^^
File “/usr/src/homeassistant/homeassistant/components/threshold/binary_sensor.py”, line 228, in _update_sensor_state
self._update_state()
~~~~~~~~~~~~~~~~^^
File “/usr/src/homeassistant/homeassistant/components/threshold/binary_sensor.py”, line 289, in _update_state
if below(self.sensor_value, self._threshold_lower):
~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/threshold/binary_sensor.py”, line 273, in below
return sensor_value < (threshold - self._hysteresis)
^
~
TypeError: unsupported operand type(s) for -: ‘int’ and ‘NoneType’

when creating a binart threshold sensor.

You will need to post the yaml for your sensor using this button to properly format it.
image

there’s no yaml. Created with a helper. “create threshold sensor”
Hysteresis: 5
lower: 10
entity_id: is a light sensor

And your light sensor has a valid state?

Yes. Value was 12 are that time.

After multiple reboots, also because of some updates, the errors are suddenly gone (for now)
I hope the errors don’t return.
Btw, the helper always seemed to work.
Probably some code that was created during the creation of the helper, that was cleaned during reboot? Sounds strange, I know.