As far as I can tell @dicko is just starting out. I was tying to keep it as basic as possible. Does custom:ui actually work with lovelace now? I didn’t think it did so I haven’t used it since I switched over. If it does that could make things interesting! And I’m assuming at this point any new users will jump right into lovelace UI since it is the default now.
device_class:power and an icon_template are used
I included the device_class to get the reported state like you mentioned. I’ve done similar things with many of my binary sensors (used a device class to display the state with my own icons). It seems to work well. Is there a disadvantage to doing it this way?
Re duplicate sensors - I hear ya! That is why I suggested using hidden: true in the customize.yaml for the duplicate sensor earlier in the thread.
I’m not sure what you mean about the binary_sensor.template? That is exactly what I used here? I see I didn’t show that, so this could have been either or. I guess I assumed we were all on the same page using binary sensor since we started with the ping sensor and required on/off state. I suppose I should be specific about that in the future. You are absolutely correct though, in this case I could have dropped the test for unknown, it was pointless. I think I copied the base from one of my regular sensors and didn’t go over the code carefully enough (as evidenced by the typo that was originally in there too!)
of course there’s the binary_sensor Ping
The ping sensor is what we started out with at the top of the thread! I have a feeling that his TV device (whatever it is) is still pingable in the off state like a Chromecast and that is where the problem currently lies. That and I’m not sure why he isn’t using a media player entity for his TV. My only experience with TV’s is using a Chromecast so I could be wrong here.
I’ve only been working with HA for a year or so now myself and am now trying to pay forward some of the help I’ve gotten along the way. So if anything I suggest can be done better or more efficiently lay it on me - I’m all ears!