blueprint: name: Binary Sensor for Device Power Status description: A template binary sensor that tracks device status based on energy consumption thresholds. domain: automation input: power_sensor: name: Power Sensor description: Sensor that measures power consumption. selector: entity: domain: sensor threshold: name: Threshold description: Power threshold for "Device is running". default: 3 selector: number: min: 1 max: 100 delay_on: name: Turn-On Delay (Minutes) description: Waiting time before changing the binary sensor state to "on". default: 1 selector: number: min: 0 max: 10 unit_of_measurement: minutes delay_off: name: Turn-Off Delay (Minutes) description: Waiting time before changing the binary sensor state to "off". default: 3 selector: number: min: 0 max: 20 unit_of_measurement: minutes binary_sensor_name: name: Binary Sensor Entity ID description: The name of the binary sensor entity to be created. selector: text: mode: restart trigger: - platform: numeric_state entity_id: !input power_sensor above: !input threshold for: minutes: !input delay_on action: - service: homeassistant.update_entity target: entity_id: !input binary_sensor_name - wait_for_trigger: - platform: numeric_state entity_id: !input power_sensor below: !input threshold for: minutes: !input delay_off - service: homeassistant.update_entity target: entity_id: !input binary_sensor_name