I was wondering how I can use hammerspoon’s - hs.battery.percentage() to show up in home assistant.
I have tried Glances and it doesn’t allow me to see battery %. I would love another way but with the amount of googling I have done hammerspoon seems to be the only way but I don’t even know where to start now that it’s installed on my Mac.
Thanks for this! I expanded on it a bit so we also get brightness and the wifi ssid every time the battery percent changes (this was frequent enough for me so I kept it simple instead of setting up individual watchers).
We could potentially get connected usb and serial devices too but I didn’t have a chance to figure out how to convert from the Lua table format.