Please remove

Hi :slight_smile:

First of all, thank you for this blurprint.

maybe you can add a sensor for humidity. so when you are in shower it knows you are in the rum an will not turn off the light :slight_smile:

It would be nice to have an option if a light or light group is triggered manually/locally, then reset the timeout timer. I understand that sometimes motion detectors can be less than perfect, so sometimes I have to hit the light. I also see it as beneficial if there are NO other sensors in the room (motion/media/presence, etc.)

Could be optional and an added feature to integrate under one blueprint.

Nvm. Still posting before I troubleshoot. Should have learned by now.

Adding a request for this.

If occupancy is on for any defined room, and the household changes to not_home and guest input boolean is off, then turn off occupancy input_boolean for that room.

Iā€™ve covered with adding to away script triggered by automation, but would prefer this being a part of the blueprint.

Thanks!

This is a great idea, as a person that spends a lot of their free time on the computer, my computer being in use could be pretty useful data for room occupancy. Maybe you could work IOT link sensors into this?

1 Like

I believe this is not working on the motion side if presence sensors are additionally used. I am finding that when the bluetooth goes ā€œoffā€, it overrides all of the above including motion + timer.

I will work to improve the blueprint on my side (@gdeboos) with over 1K clicks, do you intend to maintain this further?

There is indeed a bug in the motion timeout logic. You need to change the following variables in the blueprint to make it work:

motion_timeout: '{{ states(''input_number.motion_occupancy_timeout'') | float(10) }}'
motion_last_changed: '{{ states[motion_sensor].last_changed.timestamp() | float(0) }}'
motion_is_timed_out: '{{ (time_now - motion_last_changed) > (motion_timeout * 60) }}'

motion_timeout had no default value and wasnā€™t converted to seconds for motion_is_timed_out.

2 Likes

I tried fixing this myself with the suggestions you made, but after saving the automation from the blueprint, it does not appear in 'ā€˜automationsā€™.

Stinks, Iā€™d really like to be able to use this, even with motion disabled, and presence detection and a door sensor, its fires off every 20 seconds until it maxes out

Iā€™m trying to use this without media players (as they are optional), and itā€™s consistently failing with the error ā€œMessage malformed: Missing input media_playersā€. (The media player toggles are also disabled and Iā€™ve tried removing the default media player text as well.)

you need to set it to ā€˜media_player.noneā€™

However, this blueprint seems to be broken, for me. Althoguht its exactly what I needed for room assistant.

1 Like

Your assist helped and Iā€™ve now got it working on my end and was able to create an Automation. Are you seeing any errors in the logs?

Are you using room assistant? If I use room assistant it makes this automation go berserk and try to turn off on 100 times until HA kills it.

This is newer, and I agree, I am getting updates now with every distance change which is triggering the automation. Iā€™m looking into rate limiting or something. This is crazy!

Edit: Something seems wrong in the triggering of this automation. It is only using the ā€œstateā€ of the entity, not the attributes, so it should NOT be firing when only the distance changesā€¦

This should NOT trigger since the state is staying the same:

trigger:
  id: '4'
  idx: '4'
  platform: state
  entity_id: sensor.xxx_pixel_3a_room_presence
  from_state:
    entity_id: sensor.xxx_pixel_3a_room_presence
    state: Family Room
    attributes:
      distance: 9.3
      last_updated_at: '2022-04-13T13:02:52.480Z'
      icon: mdi:bluetooth
      friendly_name: xxx Pixel 3a Room Presence
    last_changed: '2022-04-13T13:02:14.795064+00:00'
    last_updated: '2022-04-13T13:02:52.552215+00:00'
    context:
      id: 8b391a8e1198d60331cdcb56e8c3352f
      parent_id: null
      user_id: null
  to_state:
    entity_id: sensor.xxx_pixel_3a_room_presence
    state: Family Room
    attributes:
      distance: 8.2
      last_updated_at: '2022-04-13T13:03:12.326Z'
      icon: mdi:bluetooth
      friendly_name: xxx Pixel 3a Room Presence
    last_changed: '2022-04-13T13:02:14.795064+00:00'
    last_updated: '2022-04-13T13:03:12.395774+00:00'
    context:
      id: 4ddc685f91465499bba2c194a45b9a60
      parent_id: null
      user_id: null
  for: null
  attribute: null
  description: state of sensor.xxx_pixel_3a_room_presence

Ok so what I have discovered (in chatting on discord) is that Automation ā€œStateā€ triggers on attribute changes also: Automation Trigger - Home Assistant

If we donā€™t want the automation to trigger on an attribute change (distance) we need to, per the docs:

To trigger on all state changes, but not on changed attributes, set at least one of from or to to null .

So what I did is I modified:

  - platform: state
    entity_id: !input presence_entities

to:

  - platform: state
    entity_id: !input presence_entities
    from: null

Will see if that works!

1 Like

I have essentially torn down my room-assistant array sans two devices, the price of Piā€™s was just too much and they were needed other places. But if you do get this blueprint working with RA please do report back, as I this automation would be useful.

Hey all, I wanted to let you know that with permissions, I have taken @gdeboos 's great work and ā€œforkedā€ this into my own version.

Iā€™ll create a separate post, but if you want to test it out alongside me, you can import via this link:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

2 Likes

Moved to a new thread, please post any updates or questions there: