Turn on lamp when TV is on

Try '{{ states.switch.living_room_tv.attributes["Current consumption"] | replace(" W", "") | float }}'

Found here: TPLINK HS110 switch, use energy consumption as sensor

2 Likes