The code is correct. Maybe the template sensor implementation is not monitoring if an entity attribute is disappearing? I suggest to give it a try in reverse. Maybe…
"{% if
state_attr('media_player.lg55c9','entity_picture') != None %}On{% else %}Off{% endif %}"
Sure. Go to Developer tools > States and look for your entity in the list (media_player.lg55c9). The TV has to be turned on. Some attributes like entity_picture only exist if the TV is on. I think all WebOS TV has the entity_picture attribute.
I am using the notification feature of my LG TV to notify about members of the family arriving, washer / dryer done etc, and would love to add custom icons using the setting the entity_picture to some custom icon, but no message is shown when I attempt this…
Anyone had any success adding custom icons to LG TV messages?