I have all my network devices showing on HA, so that I can check what is online or offline. On those devices I only want to see if they are home or not_home (they will never be in any other state). Having them as normal device_tracker’s does not look very good, so I made a component to automatically create binary sensors from them, and now they look like this:
Glad you find it awesome
I don’t think it would be accepted, since you can do this with template sensors (but in a much more cumbersome way, since you would have to manually define each one of them). I think that it was @pilotak who submitted his component (which is similar to mine but with a different purpose), and it was rejected because of that reason. But I’ll try to check with the HA devs anyway!
Can I use any entities or just device trackers only?
Is the code looks for only status ‘on’ and ‘off’? I tried few sensor entities (rf switches) with values ‘on’ and ‘off’ but that didn’t work. I even used zwave aeotec stick in the config.
Hi, It is a great upgrade to an automatic discovery of all devices on your LAN. Can you share the full approach on how you got it implemented like configuration.yaml, folder structure etc to get this fully working.
I can’t do that right know (I’ll try in the next days), but it is pretty simple.
I added all the device_tracker entities to the custom components (as show in the example config). Then I just added the resulting binary_sensor entities to two groups.
Thanks! Since those are binary sensors, they don’t allow the text to be changed I think (they do allow device classes but their text is fixed for the class).
Using sensors instead of binary_sensors would loose the yellow icon.