Sensor automation stopped working

Hi there,

I’ve had a sensor automation working for over a year however it has just stopped working. I think it coincided with the recent change of the way tplink is configured but I cant be sure. tplink used to be configured as a switch but now has its own integration. I was surprised that I did not need to change my (custom) entity names after changing this.

I have a custom sensors that monitor the dryer and washer. When they are idle for a certain period of time they notify us via pushbullet and turn the light on in the (scary) laundry. It looks like the action is not being triggered at all. Neither the light or the PB message are being activated.

Here is my automation:

###############################
- id: 'wm_done'
  alias: wm_done
  trigger:
    platform: state
    entity_id: sensor.washingmachine_idle
    from: 'False'      
    to: 'True'     
    for:
      seconds: 60
  action:
    - service: notify.pushbullet
      data_template:
        title: "Washing is done. #washing #laundry"
        message: "Washing machine stopped because current is {{ states.switch.washingmachine.attributes['current_power_w'] | replace(' W', '') | float }} amps"
        target:
          - 'email/[email protected]'
          - 'email/[email protected]'
    - service: light.turn_on
      entity_id: light.laundry
###############################

and the sensor:

- platform: template
  sensors:
    washingmachine_idle:
      friendly_name: 'Washing Machine Idle'
      value_template: '{{ states.switch.washingmachine.attributes["current_power_w"] | replace(" W", "") | float < 1.5 }}'

I can see from the log that the idle sensor is switching from False to True but the automation is not firing. Any ideas?

Try true and false without a capital letter.

That wasn’t it I’m afraid. This post seems to suggest capitalisation is needed Washing Machine automation not working

Stumped.

Try removing the quotations from True and False.

Nah that’s not the correct syntax. Also, I found the solution and it’s (probably) my fault. All my integrations were turned off! I don’t really use any of the “new” UI facilities for editing yaml and as a result missed the “Automatons” section where you can enable and disable these. I think they must have been disabled after the last upgrade.

Does anyone know if the enabled/disabled state of each automation is stored in the config files anywhere?

Cheers. Good to have things back! Now I don’t have to walk into the scary laundry in the dark when the washing finishes. :blush:

As the device only has two states is there any reason why you are using a sensor instead of a binary_sensor?

Probably not any more. They didn’t exist when this was created.

Wow the binary sensor was committed 20 Nov 2015. Old school!