Hi I’m new to this but cant understand where I’m going wrong.
I’m trying to make a automation to turn my pc off at the wall when I shutdown the pc. I’m using a tuya smart plug to read the current and what I want it to do is if the current goes under a certain value it turn the plug off
here’s my automation
alias: if computer shutdown turn off computer plug
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.computer_current
attribute: trigger.below
below: '0.5'
value_template: A
action:
- type: turn_off
device_id: 92dd89ea7ef5d08e0238edb71f92b51a
entity_id: switch.computer
domain: switch
mode: single