tesla-local-control / tesla-local-control-addon

Control your Tesla locally from HomeAssistant
Apache License 2.0
21 stars 2 forks source link

[bashio] bashio::log instead of echo & Add DEBUG opt [ready merge #3] #9

Closed baylanger closed 3 months ago

baylanger commented 3 months ago

As usual if you need any changes don't hesitate.. I did this kind of "fast" , time for diner :)

baylanger commented 3 months ago

I added the debug option so it can be configured in the UI - in Python that's easy to set the logging. It seems bashio most likely automatically handle this option - otherwise we'd need to use something like:

if bashio::config.true debug; then
 ...
baylanger commented 3 months ago

Ready to merge.

Note: Even with the added option DEBUG, bashio::log.debug doesn't work :( log.debug was used only for this (so far):

Connecting to MQTT server; subscribe topics tesla_ble/+ and homeassistant/status

I vote to merge this unless you see anything.

baylanger commented 3 months ago

Merge #11 -> #12 -> #9 otherwise there will be conflict.

raphmur commented 3 months ago

I like your bashio logging. However, this interferes with the possibility to run this as standalone. I will merge and create a helper function that will switch between bashio & echo

baylanger commented 3 months ago

I like your bashio logging. However, this interferes with the possibility to run this as standalone. I will merge and create a helper function that will switch between bashio & echo

🎉🎉🎉

If you don’t have the time before going to bed to do the helper function, I’ll do it. I somehow thought about this as well for easier testing.

raphmur commented 3 months ago

Feel free. Don't loose your energy :) Tu peux te joindre sur ce discord: https://discord.com/invite/zkZktGFk ça permettra au moins de partager des emails si nécessaire