File tree Expand file tree Collapse file tree 5 files changed +238
-212
lines changed
components/tesla_ble_vehicle Expand file tree Collapse file tree 5 files changed +238
-212
lines changed Original file line number Diff line number Diff line change 33on :
44 pull_request :
55
6+ permissions :
7+ contents : read
68
79jobs :
810 ci :
Original file line number Diff line number Diff line change 3131CONF_MINS_TO_LIMIT = "mins_to_limit"
3232CONF_BATTERY_RANGE = "battery_range"
3333CONF_CHARGING_STATE = "charging_state"
34+ CONF_CHARGE_PORT_LATCH_STATE = "charge_port_latch_state"
3435CONF_CHARGE_ENERGY_ADDED = "charge_energy_added"
3536CONF_CHARGE_DISTANCE_ADDED = "charge_distance_added"
3637CONF_LAST_UPDATE = "last_update"
134135 cv .Optional (CONF_CHARGING_STATE ): text_sensor .text_sensor_schema (
135136 icon = "mdi:ev-station"
136137 ).extend (),
138+ cv .Optional (CONF_CHARGE_PORT_LATCH_STATE ): text_sensor .text_sensor_schema (
139+ icon = "mdi:battery-lock"
140+ ).extend (),
137141 cv .Optional (CONF_LAST_UPDATE ): text_sensor .text_sensor_schema (
138142 icon = "mdi:update"
139143 ).extend (),
@@ -263,6 +267,10 @@ async def to_code(config):
263267 conf = config [CONF_CHARGING_STATE ]
264268 ts = await text_sensor .new_text_sensor (conf )
265269 cg .add (var .set_text_sensor_charging_state (ts ))
270+ if CONF_CHARGE_PORT_LATCH_STATE in config :
271+ conf = config [CONF_CHARGE_PORT_LATCH_STATE ]
272+ ts = await text_sensor .new_text_sensor (conf )
273+ cg .add (var .set_text_sensor_charge_port_latch_state (ts ))
266274 if CONF_LAST_UPDATE in config :
267275 conf = config [CONF_LAST_UPDATE ]
268276 ts = await text_sensor .new_text_sensor (conf )
You can’t perform that action at this time.
0 commit comments