@MediaCowboy About that… I updated the README earlier today as I realized the signal strength and the battery level had some intricacies that needed explaining:
Notes on selected Sensor Attributes:
signal_strength : This is the absolute value of the RSSI, not a percentage. As such, lower is stronger. By definition, RSSI doesn’t have upper and lower bounds so it can’t be translated into a percentage unless specified by Wyze what the bounds are.
battery_level : The sensor does a basic calculation with the battery voltage. Because of this, battery percentage may be higher than 100% when you first get a sensor.
If anyone has suggestions on if its worth guessing the bounds and converting to a percentage let me know. Maybe it could also be changed to just plain rssi to avoid confusion.
@MediaCowboy I agree. signal_strength is now rssi. Code and README have been updated accordingly and pushed. It will update the attribute the next time the sensor triggers. I got some questions about that too through github so this is definitely less confusing. Thanks for the input!
I just checked out the discord. Thank you! Next week I’m gonna see what it’ll take to get this into HA by default. It seems to meet all the requirements. I appreciate all the effort you’ve put into the early debugging, feature suggestions, and answering questions around here.
Is anyone that is running @kevinvincent’s custom component doing so in Docker? How are you passing the USB port into the container? Just running it in privileged mode?
Running mine in docker on Unraid. Unraid has a GUI where you can just point the container to the USB device path to pass it through so that’s how I’m doing it. Works perfectly.
I’m currently running gosense but if you are going to try to get yours incorporated into core I may as well switch now and do away with the mqtt requirement. I’ll go ahead with privileged mode.
Super easy setup, thanks to everyone that worked on this.
I added a template sensor for the battery level that I wanted to share.
First time I tried to make one so I’m not 100% sure if the code is correct, but it works fine on my setup.
Just a small tip, you can get rid of all the icon_template: stuff and replace it with device_class: battery instead.
It does the exact same stuff as the icon_template but saves like ~20 lines of code. Just makes things a bit cleaner, especially if you plan to add more template sensors.
Cool thanks. At one point when I compared this sensor to my other ones I thought “it would be nice to be able to set the sensor type” but I had no idea how to do it. Time to simplify the code. I edited the original post.