Enhanced motion controller to activate scenes by time and illuminance - now in addition with idle ambient scene

Yes that should be possible.

“scene.none”, did you find that in a documentation or more guessing?

@dkoehler are you willing to make this a “big” blueprint with all the stuff you dont need?

1 Like

Also it looks like that there is a bug.

If no scene is used the choosen light(s) will not switch to on.
In the first choose section it checks for all the scenes but if none is configured it´s missing

    default:
      - service: light.turn_on
        target: !input light_target

Hi, cause of time reasons, I will not implement this. You can simply create a fork on github and implement it on your own

Hi, scene.none is more guessing. Cause I was forced to use the official notation. No documentation found for that. And I will stop to enhance this blueprint. My experience for now: Using blueprints based on yaml syntax is getting extremely harder if you want to increase abstraction level. Especially in terms of debugging.

Furthermore things getting harder for me, cause I have no deep experience with Homeassistant. Before I was using NodeRed, which makes debugging a little bit easier. And I am just wondering, what are the benefits when using Homeassistant automation? From my point of view it is much easier to use NodeRed with Homeassistant-

You are right. This is also an outcome of trying to make things more abstract and usable for all. I removed the functionality to have the scenes optional.

I’m beginning to question this myself !. I had some automations working in Nodered OK. Could never get my head aroudn teh HA automations. BLueprints looked very useful in last few days as people like you did work to get some easy-to-use blueprints working. but more and more I still see NR as an easier solution. Especially for debugging. that debug node is worth everything !

The only benefit I see at the moment is, that you have less dependencies in your automation. Even if you are using only the core nodes of Node Red in addition with the HA nodes, you have dependencies to many external libs in the background. And you also have to be sure, that the HA nodes in Node Red are all the time working with the current HA version.

Hi all,

i can absolutly understand you. I switched from node red to Home Assistant automations with the big automation changes and find it kinda ok.
Node red is way more flexible and more important, quite easy to debug.
My first try with Blueprints and debug capabilitys are not that good.

I love the idea of bluebrints but it is lacking some stuff for now. I really think most of this stuff will be added (like a good documentation, versioning)

I will fork yours (really like the scenes, do not need the ambient but it is already in there) and will do some changes that it fits my needs.

@iroQuai I will make a version without lux sensor that you can use if you want

1 Like

Hi there, loving this blueprint, it covers 90% of my needs for my motion sensor :slight_smile:
The only real thing i need is to be able to add a condition, so i can disable the automation when the user changes the lights.
Right now i’ve done this with a physical hue button, for which i could make an automation.
But the problem i’m running in to, is that when i make an automation that disables the motion automation when a user changes a scene in the hue app, it also triggers when the motion sensor changes the scene.

So, i’m in need of a way to add a condition where i can utilize a boolean (toggle) helper, to pre-set if it was the motion sensor or the user that triggered the event, so the automation does not accidentally disable itself when it changes the scene.

Would this be a possibility? I’m a bit new at home assistant so i have not really worked out all the logic yet.

By all rights, a default value of none should be allowed. It is the accepted way to specify no service or entity_id when used in an automation or script. However, it’s not accepted (for whatever reason) in a blueprint. :man_shrugging:

I’m using light.none as a default value in a blueprint but the name ‘none’ is not magical. The entity_id simply needs to refer to a non-existent entity.

:+1:

Hopefully, the difficulties encountered by the first generation of blueprint authors will help to introduce improvements in future versions.

Small addition, i’ve expanded on the blueprint myself a bit, to allow for such a boolean helper.
Next to that i added a wait time per timeslot for when the lights should be turned off again

I noticed this in your blueprint (lines 201 and 203 and 205):

!input !input no_motion_wait_night

Possibly the result of a search-and-replace that produced doubled !input keys.

Yea i saw it and fixed it :slight_smile: thanks
Still don’t fully have it working, because

{% if (states.sensor.time.state > time_scene_night) and (states.sensor.time.state < time_scene_morning) %} 
        !input no_motion_wait_night
      {% elif (states.sensor.time.state > time_scene_morning) and (states.sensor.time.state < time_scene_evening) %}
        !input no_motion_wait_morning
      {% else %}
        !input no_motion_wait_day
      {% endif %}

the input variables inside of the if statement aren’t returning a value, using them like

!input time_scene_night

inside the statements makes no difference, any clues as to how i’d fix that? I’m a little stumped and google isn’t really helping me

Hi,
you have to put e.g. !input time_scene_night into a variable before and use the varibale within the template.

variables:
  no_motion_wait_night: !input no_motion_wait_night
  no_motion_wait_morning: !input no_motion_wait_morning
  no_motion_wait_day: !input no_motion_wait_day


{% if (states.sensor.time.state > time_scene_night) and (states.sensor.time.state < time_scene_morning) %} 
       {{no_motion_wait_night}}
      {% elif (states.sensor.time.state > time_scene_morning) and (states.sensor.time.state < time_scene_evening) %}
         {{no_motion_wait_morning}}
      {% else %}
        {{no_motion_wait_day}}
      {% endif %}

But it is only an assumption

The !input tag is used by the YAML processor to perform a substitution. It is designed to assign a value to a key.

The key in the following example is entity_id

  entity_id: !input whatever

You have not used !input in that manner. You have it standing alone within a template.

You must do what dkoehler suggested because it uses the !input tag to assign a value to a key. Create a variable, assign the selector value to it, then use the variable in the template.

Ok gotcha, makes sens :slightly_smiling_face:
I’ll expiriment a little more with it

Did you get it working with groups of motion sensors yet? Would it only require broadening the filter on the selector for motion_entity?

Hi, unfortenately I switched back to node red. Much more comfortable debugging and faster results.