Closed pszafer closed 5 years ago
I think it should be better to always take access_key and password already encrypted in Encryption. Gateway should be enhnaced to take them encrpyted already. having an extra method which encrypt password and access-key would be better this way, HA integration could request clear password and access-key and store them encrypted. gateway constructor would be always called with encrypted.
that will also allow us to have a cli.py to use the library directly in command-line, where you would enter also manually password and key .
ok, I have to push my HA fork so you can see how it looks like :)
I store this in HA:
self._saved_key = key_hash.hexdigest() + password_hash.hexdigest()
Check it out. https://github.com/pszafer/home-assistant/tree/bosch_thermostat
You should be able to run it without any config and shoud appear as discovered device.
To have your lib available run in HA directory ln -s /path/to/lib lib/python3.7/site-packages/bosch_thermostat_http
changes in encryption class to retrieve key and store key instead of passwords.