encryption key persistence between yaml and UI #896
UltraSalem
started this conversation in
General
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
Something neat I found. When setting up, I wasn't entirely sure what I was doing so I added this component to my configuration.yaml using the single ble_monitor: line as per the config doco. All my BLE temp sensors ( xiaomi miaomiaoce.sensor_ht.t2 ) were discovered, but not giving any data. I then discovered my sensors were encrypted, grabbed their keys using the python script method in the doco (which was nice and easy - only bit worth clarifying in the doco is which field you'll want from what the script pulls back. It wasn't immediately clear if I should be using the TOKEN value or the BLE KEY value. The BLE KEY was the correct one), and then edited the configuration.yaml to add the bare minimum for each device:
This worked and I started to get data.
I then decided I wanted to use the HA UI instead of the yaml editing, to keep my yaml clean. I assumed I would have to enter all the keys again, but all I had to do was comment out the ble_monitor section (and its devices) from my configuration.yaml and restart HA, and the service was still in my services panel, my devices were still all there, and they were still providing data! When the doco says "you can change between UI and yaml easily", it didn't actually say HOW to do that, so this was all a nice surprise. Just thought I would share in case anyone else was in a similar situation and didn't want to have to reconfigure all their devices.
I do have two bluetooth hubs for xiaomi devices (a bedside lamp and an air purifier), but the xiaomi_miio integration didn't like the temp sensors, which is how I ended up finding this project at all. Big thanks to the devs!
Beta Was this translation helpful? Give feedback.
All reactions