Threshold Binary Sensor

Hi

I am trying to setup a threshold binary sensor and receive the error below on startup. I am running 34.3 so the version is okay.

Error:

16-12-06 13:33:04 homeassistant.loader: Unable to find component sensor.threshold
16-12-06 13:33:04 homeassistant.bootstrap: Unable to find platform sensor.threshold

Here is the config for sensor in question:

sensor:
  platform: threshold
  threshold: 100
  type: upper
  entity_id: sensor.aeotec_zw096_smart_switch_6_power_58_8

The entity_id IS valid. I’d like to use this threshold sensor for dryer instead of having to do something complicated, to see when dryer is done.

When I look at States here is what I see for that entity_id:

sensor_class: power
node_id: 58
unit_of_measurement: W
friendly_name: Office TV
Power icon: mdi:speedometer

It’s a binary sensor. The sample in the docs was recently updated.

Yes! This corrected the problem, thank you. I see the document has been updated to reflect the correction. In case anyone searches for this problem and has it (you shouldn’t since doc is updated) here is my updated config:

binary_sensor:
  platform: threshold
  threshold: 100
  type: upper
  entity_id: sensor.aeotec_zw096_smart_switch_6_power_58_8

I am having the same issue, but using the correct syntax…

17-04-16 06:48:52 ERROR (MainThread) [homeassistant.loader] Unable to find component binary_sensor.threshold
17-04-16 06:48:52 ERROR (MainThread) [homeassistant.bootstrap] Unable to find platform binary_sensor.threshold

Any ideas?

still getting these errors while ive set the sensors up according to the documentation:

2018-01-17 07:58:06 ERROR (MainThread) [homeassistant.config] Invalid config for [binary_sensor.threshold]: required key not provided @ data[‘threshold’]. Got None
required key not provided @ data[‘type’]. Got None. (See ?, line ?). Please check the docs at https://home-assistant.io/components/binary_sensor.threshold/

changed the sensors to the syntax you use here and now error in the logs are gone and sensors show up fine.

Documentation should be updated … though it does seem more efficient to define the threshold binary_sensor as described on https://home-assistant.io/components/binary_sensor.threshold/

correct syntax:

- platform: threshold
  name: "Wasmachine threshold"
  entity_id: sensor.wasmachine_bijkeuken_actueel
  type: upper
  threshold: 4

- platform: threshold
  name: "Droger threshold"
  entity_id: sensor.wasdroger_bijkeuken_actueel
  type: upper
  threshold: 4

- platform: threshold
  name: "Vaatwasser threshold"
  entity_id: sensor.vaatwasser_keuken_actueel
  type: upper
  threshold: 4

documented syntax (not working resulting in errors)

- platform: threshold
  name: "Wasmachine threshold"
  entity_id: sensor.wasmachine_bijkeuken_actueel
  upper: 4

- platform: threshold
  name: "Droger threshold"
  entity_id: sensor.wasdroger_bijkeuken_actueel
  upper: 4

- platform: threshold
  name: "Vaatwasser threshold"
  entity_id: sensor.vaatwasser_keuken_actueel
  upper: 4
1 Like

theres no such thing as coincidence…

i created these threshold sensors at the exact moment the latest hassio update was rolled out, and now the original sensors i made are correct after all…

- platform: threshold
  name: "Wasmachine threshold"
  entity_id: sensor.wasmachine_bijkeuken_actueel
  upper: 4

- platform: threshold
  name: "Droger threshold"
  entity_id: sensor.wasdroger_bijkeuken_actueel
  upper: 4

etc.

of course several other options available.
Documentation still could benefit from an update.

check: https://github.com/home-assistant/home-assistant/pull/11110 for specifics on the latest.
breaking changes in 0.61.1

threshold and template sensors (with some custom ui embellishments)

cheers,
Marius

1 Like