How I test #680
andrew-codechimp
started this conversation in
Show and Tell
How I test
#680
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Just for fun and after a bit of a frantic morning with beta's I thought I'd share how I handled testing all the battery low/battery increased code and the automations/blueprints.
With v2 it became clear pretty quickly I couldn't wait for devices to drop battery level so I used an M5Stack Matrix ESP device I had in a box and a potentiometer on a grove connector, with a little code in ESPHome I translate the voltage into a percentage and kick out a device_class battery value for it.
Using this I can quickly test automations are working and also try weird scenarios like a binary battery, which I ignore today but may get smarter with later.
If anyone is interested in the espHome code it's here
Beta Was this translation helpful? Give feedback.
All reactions