nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

Option to expose climate as a switch? #102

Closed DaveLinger closed 1 year ago

DaveLinger commented 1 year ago

Hi there! I've been using this plugin for a while and just realized that we now have to tell siri a specific temperature to set the climate to in order to turn it on - as described in the example.

However, usually I just want to turn climate ON, just like the official tesla app does if you tap the fan icon. I don't want to change whatever it's set to, I just want to enable it.

So I'd prefer "climate" as a SWITCH, so I can say "hey siri turn on the model 3 climate", without the followup asking me what temperature I want to set it to.

Could this be added as another json config option, to expose climate on/off as a switch? The current thermostat implementation could stay how it is - I'd just rename it model 3 temperature in case I ever want to actually control the temp.

nfarina commented 1 year ago

Yeah I waffled on this for a while. The prior version of the plugin exposed it as a switch, but I thought it would be nice to have a "real" thermostat for HomeKit. I personally only turn it on - but what I did is make a Scene called "Warm up the car" that sets the climate to 70º. Easier to remember for me.

I would be open to making an option to have it back as a switch if it still seems necessary though.

DaveLinger commented 1 year ago

I hadn't considered the scene idea, but that helps somewhat. The downsides to this would be - firstly, I still have to choose and set a desired temperature (right?). I'd prefer to just turn climate on, and leave it on whatever it was already set to in the car. I like slightly different temps over the course of the year (maybe as low as 68 in the summer, maybe as high as 72 in the winter), so I don't want to set up multiple scenes or remember to go in and change the chosen temp for the one scene.

Secondly (and this is obviously a nitpick), but if I made a scene for "warm up the car", it would make sense in the winter - but if I wanted to run the AC as I'm coming out to the car in the summer, it wouldn't make sense to ask the car to "warm up" (I'd also feel like an idiot if anybody heard me), so I guess I could make a second/alternate scene so that either phrase would work, but really, "turn on the model 3 climate" makes the most sense - and naming a scene that way probably wouldn't work well considering there are homekit accessories with similar names.

Anyway I 100% understand why some people would prefer the full-thermostat implementation with temperature control - I'm not suggesting that be removed, I'd prefer either:

  1. The option to SWITCH from the full thermostat to only a simple switch for climate -or-
  2. In addition to the full thermostat, the option to also expose a simple climate switch.

Thank you for the response!

nfarina commented 1 year ago

I've added an option in the config to expose the climate service as a simple switch - I think I'll probably use this myself; what you describe makes more sense to me, I'd rather control temp from inside the vehicle as the current temp will reflect the current weather better.

I'm not at home so I can't update my own Homebridge instance to test it - would you mind updating the plugin and seeing if it works? 😬

DaveLinger commented 1 year ago

Had to restart homebridge twice after updating the config to enable Climate Switch (after first reboot I had no climate switch - but the climate thermostat was "not responding", although all other plugin devices WERE), but anyway afterwards I tested turning climate on and off with the switch and it's accurately reflected in the Tesla app! Seems like it's working to me. IMG_1416

nfarina commented 1 year ago

Awesome, thanks for testing it! Let me know if there are any other issues that crop up.