Energy meter switch to turn off tv

Hi!

Do any of you know how i could use a telldus energy meter switch to turn off my dumb tv with a broadlink rm pro if it uses more then 50w when i trigger a script?

Use a automation when > 50 send the ir off command