Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.nissan_leaf.LeafDataStore Class Reference

Public Member Functions

None __init__ (self, HomeAssistant hass, Leaf leaf, dict[str, Any] car_config)
 
CarwingsLatestBatteryStatusResponse async_get_battery (self)
 
CarwingsLatestClimateControlStatusResponse async_get_climate (self)
 
None async_refresh_data (self, datetime now)
 
bool async_set_climate (self, bool toggle)
 
None async_start_charging (self)
 
None async_update_data (self, datetime now)
 
datetime get_next_interval (self)
 
None schedule_update (self)
 

Public Attributes

 car_config
 
 force_miles
 
 hass
 
 last_battery_response
 
 last_check
 
 last_climate_response
 
 leaf
 
 next_update
 
 request_in_progress
 

Private Attributes

 _remove_listener
 

Detailed Description

Nissan Leaf Data Store.

Definition at line 213 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.nissan_leaf.LeafDataStore.__init__ (   self,
HomeAssistant  hass,
Leaf  leaf,
dict[str, Any]   car_config 
)
Initialise the data store.

Definition at line 216 of file __init__.py.

Member Function Documentation

◆ async_get_battery()

CarwingsLatestBatteryStatusResponse homeassistant.components.nissan_leaf.LeafDataStore.async_get_battery (   self)
Request battery update from Nissan servers.

Definition at line 347 of file __init__.py.

◆ async_get_climate()

CarwingsLatestClimateControlStatusResponse homeassistant.components.nissan_leaf.LeafDataStore.async_get_climate (   self)
Request climate data from Nissan servers.

Definition at line 425 of file __init__.py.

◆ async_refresh_data()

None homeassistant.components.nissan_leaf.LeafDataStore.async_refresh_data (   self,
datetime  now 
)
Refresh the leaf data and update the datastore.

Definition at line 292 of file __init__.py.

◆ async_set_climate()

bool homeassistant.components.nissan_leaf.LeafDataStore.async_set_climate (   self,
bool  toggle 
)
Set climate control mode via Nissan servers.

Definition at line 439 of file __init__.py.

◆ async_start_charging()

None homeassistant.components.nissan_leaf.LeafDataStore.async_start_charging (   self)
Request to start charging the car. Used by the button platform.

Definition at line 477 of file __init__.py.

◆ async_update_data()

None homeassistant.components.nissan_leaf.LeafDataStore.async_update_data (   self,
datetime  now 
)
Update data from nissan leaf.

Definition at line 239 of file __init__.py.

◆ get_next_interval()

datetime homeassistant.components.nissan_leaf.LeafDataStore.get_next_interval (   self)
Calculate when the next update should occur.

Definition at line 259 of file __init__.py.

◆ schedule_update()

None homeassistant.components.nissan_leaf.LeafDataStore.schedule_update (   self)
Set the next update to be triggered in a minute.

Definition at line 482 of file __init__.py.

Member Data Documentation

◆ _remove_listener

homeassistant.components.nissan_leaf.LeafDataStore._remove_listener
private

Definition at line 245 of file __init__.py.

◆ car_config

homeassistant.components.nissan_leaf.LeafDataStore.car_config

Definition at line 222 of file __init__.py.

◆ force_miles

homeassistant.components.nissan_leaf.LeafDataStore.force_miles

Definition at line 223 of file __init__.py.

◆ hass

homeassistant.components.nissan_leaf.LeafDataStore.hass

Definition at line 220 of file __init__.py.

◆ last_battery_response

homeassistant.components.nissan_leaf.LeafDataStore.last_battery_response

Definition at line 329 of file __init__.py.

◆ last_check

homeassistant.components.nissan_leaf.LeafDataStore.last_check

Definition at line 300 of file __init__.py.

◆ last_climate_response

homeassistant.components.nissan_leaf.LeafDataStore.last_climate_response

Definition at line 340 of file __init__.py.

◆ leaf

homeassistant.components.nissan_leaf.LeafDataStore.leaf

Definition at line 221 of file __init__.py.

◆ next_update

homeassistant.components.nissan_leaf.LeafDataStore.next_update

Definition at line 248 of file __init__.py.

◆ request_in_progress

homeassistant.components.nissan_leaf.LeafDataStore.request_in_progress

Definition at line 301 of file __init__.py.


The documentation for this class was generated from the following file: