Hi folks,
I want to turn my smart plug (Shelly Plug S) off, when the power is under 50 W for 15 minutes.
I’ve tried to create a scene, which sould be activated by an automation.
Scene:
- id: '1674658056631'
name: 'PDU_KW-PC: Aus'
entities:
switch.pdu_kw_pc:
friendly_name: PDU_KW-PC
state: 'off'
icon: hue:room-computer-off
metadata:
switch.pdu_kw_pc:
entity_only: true
Automation:
- id: '1674658163087'
alias: 'PDU_KW-PC: Aus'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.pdu_kw_pc_power
for:
hours: 0
minutes: 15
seconds: 0
below: 50
condition: []
action:
- service: scene.turn_on
target:
entity_id: scene.pdu_kw_pc_aus
metadata: {}
mode: single
Home Assistant 2023.1.7
Supervisor 2022.12.1
Frontend 20230110.0 - latest
Running on Debian 11
When I execute the scene or the automation the plug is switched off successfully.
In my opinion the problem is, that automations and scenes have the state on/off. Initially the automation works. But when anyone in the home switches the plug on manually, the automation doesn’t work anymore. This is just a suggestion.
Hopefully there exists a best practice for my use case.