Hey community,
I am currently trying to check if any power is being drawn at all (charger) when activating a switch. If no power is drawn within 5 minutes, the switch should be turned off again.
While it is possible to set a for condition in triggers (power is below 0.5 W for 5 minutes), this does not work for conditions.
This is working:
alias: 'Smartwatch: Prüfe Ladung beim Einschalten'
description: ''
trigger:
- platform: device
type: turned_on
device_id: 181e3c909c3abfd5c3b21ef64c0b2a88
entity_id: switch.workingroom_smartwatchdocking
domain: switch
condition:
- condition: state
entity_id: input_boolean.automation_smartwatch_docking
state: 'on'
action:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- condition: numeric_state
entity_id: sensor.workingroom_smartwatchdocking_power
below: '0.5'
- type: turn_off
device_id: 181e3c909c3abfd5c3b21ef64c0b2a88
entity_id: switch.workingroom_smartwatchdocking
domain: switch
mode: single
But I need it like this:
alias: 'Smartwatch: Prüfe Ladung beim Einschalten'
description: ''
trigger:
- platform: device
type: turned_on
device_id: 181e3c909c3abfd5c3b21ef64c0b2a88
entity_id: switch.workingroom_smartwatchdocking
domain: switch
condition:
- condition: state
entity_id: input_boolean.automation_smartwatch_docking
state: 'on'
action:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- condition: numeric_state
entity_id: sensor.workingroom_smartwatchdocking_power
below: '0.5'
for:
hours: 0
minutes: 5
seconds: 0
- type: turn_off
device_id: 181e3c909c3abfd5c3b21ef64c0b2a88
entity_id: switch.workingroom_smartwatchdocking
domain: switch
mode: single
Do you know other possibilities?
Thanks in advance!