Try '{{ states.switch.living_room_tv.attributes["Current consumption"] | replace(" W", "") | float }}'
Found here: TPLINK HS110 switch, use energy consumption as sensor
Try '{{ states.switch.living_room_tv.attributes["Current consumption"] | replace(" W", "") | float }}'
Found here: TPLINK HS110 switch, use energy consumption as sensor