Get data from Start.ca API.
Definition at line 194 of file sensor.py.
◆ __init__()
| def homeassistant.components.startca.sensor.StartcaData.__init__ |
( |
|
self, |
|
|
|
loop, |
|
|
|
websession, |
|
|
|
api_key, |
|
|
|
bandwidth_cap |
|
) |
| |
Initialize the data object.
Definition at line 197 of file sensor.py.
◆ async_update()
| def homeassistant.components.startca.sensor.StartcaData.async_update |
( |
|
self | ) |
|
Get the Start.ca bandwidth data from the web service.
Definition at line 218 of file sensor.py.
◆ bytes_to_gb()
| def homeassistant.components.startca.sensor.StartcaData.bytes_to_gb |
( |
|
value | ) |
|
|
static |
Convert from bytes to GB.
:param value: The value in bytes to convert to GB.
:return: Converted GB value
Definition at line 209 of file sensor.py.
◆ api_key
| homeassistant.components.startca.sensor.StartcaData.api_key |
◆ bandwidth_cap
| homeassistant.components.startca.sensor.StartcaData.bandwidth_cap |
◆ data
| homeassistant.components.startca.sensor.StartcaData.data |
◆ loop
| homeassistant.components.startca.sensor.StartcaData.loop |
◆ websession
| homeassistant.components.startca.sensor.StartcaData.websession |
The documentation for this class was generated from the following file:
- core/homeassistant/components/startca/sensor.py