I use this template to put any entity in this device in the template to back one specific entity binary_sensor.bluetooth_hub_connected to know the state of the device is connected or not.
but I can’t filter the result
I know this my goal extrct binary_sensor.bluetooth_hub_connected when I use Automation in the blueprint
blueprint:
name: Motion-activated Light (multiple) for ESPHome
description: Turn on a light when motion is detected.
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor
device_class: motion
multiple: true
light_target:
name: Light
selector:
target:
entity:
domain: light
Node_Connected:
name: Node Connected
description: Wait for Node Connected before activated light.
selector:
entity:
integration: esphome
domain: binary_sensor
device_class: connectivity
no_motion_wait:
name: Wait time
description: Time to leave the light on after last motion is detected.
default: 120
selector:
number:
min: 0
max: 1800
unit_of_measurement: seconds
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: !input motion_entity
from: "off"
to: "on"
action:
- wait_template: "{{ is_state(!input Node_Connected, 'on') }}"
continue_on_timeout: false
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
platform: state
entity_id: !input motion_entity
from: "on"
to: "off"
- delay: !input no_motion_wait
- service: light.turn_off
target: !input light_target
instead, use
Node_Connected:
name: Node Connected
description: Wait for Node Connected before activated light.
selector:
entity:
integration: esphome
domain: binary_sensor
device_class: connectivity
when I select light its pickup this entity because the light in the same node
all that because we have electricity issues some nodes need time to back online
variables:
Node_Connected: !input light_target "{ after filter result }"
- wait_template: "{{ is_state(Node_Connected, 'on') }}"
and remove part off
Node_Connected:
name: Node Connected
description: Wait for Node Connected before activated light.
selector:
entity:
integration: esphome
domain: binary_sensor
device_class: connectivity