Can´t get automation to trigger

not the state of the binary_sensor. I saw that.

I wanted to know the state of the “automation.wm_done”.

Ok, great thinking. It has not triggered today:

[automation.wm_done] | on | last_triggered: 2019-04-13T19:13:59.164771+00:00 friendly_name: wm_done

What does it mean that an automation is “on”?

well, crap.

The automation is actually on. i was hoping it was off because that would have been a really easy fix (i.e. turn it on).

now we need to do more troubleshooting.

Hehe, ok so the “on” tag for automation is simply if its active/listening or not.

Well all help is greatly appriciated! :slight_smile:


I am not allowed to post more posts today obviously :slight_smile:

Reply to your below question:

It´s psuedo just because it does not exist in reality. It´s a binary sensor that I have created myself for this prupose. It is the same sensor mentioned everywhere - I have no other sensors in this automation.

Meaning I have a switch with energy monitor, that I use as a imaginary binary sensor - on when under 1.5W, off when above. Then I use that sensor for triggering the push… Well so I thought…

I guess I´ll be back tomorrow when I am welcome by the system again :slight_smile:

what is that? is that different than the other binary sensor that you listed above?

yes

Ok I just wanted to make sure we were all on the same page.

and that’s strange. i didn’t realize there were limits on posting like that for users.

see you tomorrow then! :smile:

1 Like

Edit: just realised you are using a binary sensor instead of an input_boolean. Never mind my remarks, still you might get some inspiration from the examples below :relaxed:

I see an automation for turning on the input_boolean ‘Washing machine idle’, but I don’t see an automation for turning it off again. If it remains ‘on’ all the time, it will never trigger the automation.

Did you manually turn off the input_boolean before each test run? You’ll also need some logic for that part in your automation.

Here’s my stuff for inspiration, it’s been working perfectly:

Template sensor:

  - platform: template
    sensors:
      washer_pwrdn:
        value_template: "{{ states('sensor.plug_wasmachine_power') | int < 3.4 }}"

Input boolean:

input_boolean:
  washer_status:
    name: Status wasmachine
    initial: off

Automations:

- alias: Wasmachine start
  trigger:
    platform: state
    entity_id: sensor.washer_pwrdn
    from: 'True'
    to: 'False'
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.washer_status

- alias: Wasmachine ready
  trigger:
    platform: state
    entity_id: sensor.washer_pwrdn
    from: 'False'
    to: 'True'
    for:
      seconds: 90
  condition:
    condition: state
    entity_id: input_boolean.washer_status
    state: 'on'
  action:
  - service: notify.by_telegram
    data:
      message: De wasmachine is klaar.
  - service: input_boolean.turn_off
    entity_id: input_boolean.washer_status
1 Like

but it will write a warning in log file, won’t it?

yes it will.

+1 to what finity said.

I threw that into the mix because we seem to be grasping at straws here to make this thing work … yet it’s so straightforward but, for some unknown reason, the OP reports it still doesn’t work.

I think it’s time to see the code OP claims to be non-working.

Hello again everyone! :slight_smile:

Absolutely! I´m getting nuts over this!

To minimize the error possibilities, all below code is located in configuration.yaml

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

A few rows below that is the only automation:

automation:
  - alias: wm_done
    trigger:
      platform: state
      entity_id: bimary_sensor.washingmachine_idle
      to: 'on'
    action:
      service: notify.ios_ivans_iphone
      data:
        title: "Washing is done."
        message: "Washing machine stopped."

In the HASSIO overview, I have a card showing the relevant information:
Overview%20card

In the state window, I got these states:
washing%20idle%20snip
washing%20snip

Your automation trigger is “bimary_sensor”. Should be “binary_sensor”.

Well it works now. I found the m in bimary sensor when reading my ownpost above. It was binary sensor in the TS so can´t really understant what happened here but your help together with the m->n seams to have done some magic! :slight_smile: Thanks all!!!

Thanks Marta, I noticed as well. It was correct in the first (pasted) post :sleeping:

Not only was ‘binary’ correct in your first post, it was also correct in the automation I suggested you use way back in my post here which also included the use of to: on.

It also included a functional template sensor that uses the more robust state_attr function as opposed to states.switch.tvsttmaskin.attribute ... which can produce an error should the sensor be unavailable when Home Assistant starts up.

Did you try what I had suggested in that post or did you skip it?

I’d venture a guess since the currently working sensor contains square brackets which were recommended to be removed in the same post.

I really need to say that it makes it very difficult to help troubleshoot things if we assume you try the things we suggest then find out later that you didn’t.

i’m glad it’s finally working for you tho.

I did try that, but it did not help and was removed again when trying other things. I´ve included your sugestion again now for robustness :slight_smile: Cheers!

Easy there boy, I am trying everything that´s being thrown at me. No need for that bad mood of yours!

When you state ‘did not help’ but then later report a functionally identical solution, it casts doubt on your original statement. In fact, tom’s very first suggestion, to set to: on, was discounted with ‘No success though’. Yet, some 35 needless posts later, was deemed to be the solution.

What I had offered in my post was a complete solution (template sensor and automation). If it had been implemented as described it would’ve also solved the problem.

My point is not about who solved it but that this was a very easy problem to solve. However, it ballooned into an unnecessarily long debugging session (> 35 posts). I don’t mean to sound disparaging only to advise you that, as a new member of the community, this problem-solving session was notable for its incomplete and ambiguous feedback on your part. Imagine how fiendishly difficult it’ll be to solve more difficult problems in the future given the same degree of incompleteness and ambiguity.

This community has over 38000 members but if you examine who rushes to the aid of fellow members, that group of volunteers represents a microscopic fraction of the whole (I’ll say about ten regulars). With such a tiny group of ‘helpers’ it’s inadvisable to alienate them with comments about alleged ‘bad mood’.

I’m glad the problem was ultimately resolved and I wish you success with Home Assistant.

1 Like

Not in a bad mood at all…

Just offering constructive criticism for the next time you have a problem and we all get back together here again and try to figure it out. And there will be a next problem. :wink:

That’s not a statement on your abilities at all. HA has a steep learning curve for a lot of people and that curve is pretty much vertical for me at times. :grinning: