I’m trying to create a binary sensor using the trend platform. I want to trend the humidity in the house and turn on the ventilation system when it gets too high. I’ve followed some examples but I’m getting stuck on the yaml. Logs give me this error:
Logger: homeassistant.components.trend.binary_sensor
Source: components/trend/binary_sensor.py:240
integration: Trend (documentation, issues)
First occurred: 12:07:05 (1 occurrences)
Last logged: 12:07:05
float() argument must be a string or a real number, not 'NoneType'
I have an entry in my configuration.yaml to refer to a separate file for binary sensors:
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
template: !include templates.yaml
binary_sensor: !include binary_sensors.yaml
my: http://homeassistant.local:8123
The code in the binary_sensors.yaml file is as follows:
- platform: trend
sensors:
humidity_rising:
friendly_name: "Humidity Rising"
entity_id: sensor.environment_sensor_ensuite_humidity
sample_duration: 700
max_samples: 2
min_samples: 2
min_gradient: 0.03
device_class: moisture
I know something is wrong because the config variables and the following numbers after the ‘:’ have the same text colour. I’ve tried all sorts of different indentations and spacing but can’t get the numbers to appear in black text as they usually do in File Editor.
This is probably a really simple fix. I would really appreciate someone pointing me to it.