Comments (6)
The new service can set this. You'll need to know your vehicle_id. Turn on debugging of teslajsonpy to see it.
service: tesla_custom.api
data:
email: [email protected]
command: CHANGE_CHARGE_LIMIT
parameters:
path_vars:
vehicle_id: 'REPLACE'
wake_if_asleep: true
percent: '90'
from tesla.
This is something that has been discussed in the api. The problem is how to display it in HA.
from tesla.
It seems like HA has example code for using a 'light' to control what is really a volume knob in https://www.home-assistant.io/integrations/light.template/#theater-volume-control.
What is the 'custom service call' thing that is discussed in that issue? It seems a little backwards to give access only to the API surface that conveniently maps to existing toggles. Is there a different way I can call Tesla's API from Home Assistant without needing these UI base types?
from tesla.
What about a number entity?
from tesla.
What about a number entity?
That's probably the right entity. I guess we can use the value whenever the max range switch is off.
from tesla.
If anyone's looking for some templates to make this easier... I made this script to set the charge limit to any value
script:
set_tesla_max_charge:
description: Set Tesla Max Charge
fields:
charge_limit:
name: charge_limit
description: Max Percent of charge
required: true
example: 70
default: 70
mode: queued
sequence:
- service: tesla_custom.api
data:
email: !secret tesla_user
command: CHANGE_CHARGE_LIMIT
parameters:
path_vars:
vehicle_id: !secret tesla_vehicle_id
wake_if_asleep: true
percent: '{{ charge_limit}}'
And a custom "max range" switch which uses my preferred values. Note that I use teslamate MQTT to get all state instead of this component. You will like need to edit the value_template
and availability_template
properties.
switch:
- platform: template
switches:
tesla_trip_charge:
friendly_name: Tesla Charge for Road Trip
unique_id: chase_trip_charge_293u439
availability_template: "{{ is_number(states('sensor.teslamate_charge_limit_soc')) }}"
value_template: "{{ states('sensor.teslamate_charge_limit_soc')|int >= 90 }}"
turn_on:
service: script.set_tesla_max_charge
data:
charge_limit: 96
turn_off:
service: script.set_tesla_max_charge
data:
charge_limit: 70
from tesla.
Related Issues (20)
- Car being driven but entities do not update? HOT 1
- Prefix Entity-Ids with "Tesla" or VIN HOT 5
- Powerwall Sensors for Energy Stats
- Heated steering state not updating.
- Enable/disable cams when in Sentry mode HOT 2
- Powerwall operation mode does not update from the cloud following HA restart HOT 9
- Powerwall operation_mode does not update from the cloud following HA restart HOT 3
- Fix for correcting status/online in tesla_custom v3.12.2 HOT 4
- Home Assistant warning about sentry mode switch/Sentry mode not correctly reflecting state HOT 1
- Charger can go lower then 5A HOT 6
- Error due to deprecated Python when using Home Assistant 2023.6.0 HOT 5
- None not in STEERING_HEATER_OPTIONS HOT 8
- Battery sensor unavailable HOT 3
- Feature to update the refresh token. HOT 1
- KeyError: After adding 2nd vehicle
- No battery state anymore after recent update HOT 1
- Window sensors? HOT 5
- [Feature Request] Trip Energy Consumption data HOT 1
- [Feature Request] Integrate Tesla_API_Lite project to obtain Auth Token locally HOT 1
- Delete old tesla from account HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tesla.