Last active
February 19, 2017 20:29
-
-
Save janegilring/ffc7c531683320a63ccc26ffcde425f9 to your computer and use it in GitHub Desktop.
Schedule Tesla auto conditioning based on outside temperature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Import-Module -Name Tesla | |
| Connect-Tesla | |
| $OutsideTemp = (Get-Tesla -Command climate_state).outside_temp | |
| Write-Output "Outside temp is: $OutsideTemp" | |
| if($OutsideTemp -lt 1) { | |
| Write-Output "$(Get-Date): Starting heating and sleeping for 10 minutes" | |
| Set-Tesla -Command auto_conditioning_start | |
| Start-Sleep 600 | |
| Write-Output "$(Get-Date): Stopping heating" | |
| Set-Tesla -Command auto_conditioning_stop | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment