Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.nsw_fuel_station.sensor Namespace Reference

Classes

class  StationPriceSensor
 

Functions

None setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_STATION_ID = "station_id"
 
string ATTR_STATION_NAME = "station_name"
 
list CONF_ALLOWED_FUEL_TYPES
 
list CONF_DEFAULT_FUEL_TYPES = ["E10", "U91"]
 
string CONF_FUEL_TYPES = "fuel_types"
 
string CONF_STATION_ID = "station_id"
 
 PLATFORM_SCHEMA
 

Detailed Description

Sensor platform to display the current fuel prices at a NSW fuel station.

Function Documentation

◆ setup_platform()

None homeassistant.components.nsw_fuel_station.sensor.setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the NSW Fuel Station sensor.

Definition at line 57 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.nsw_fuel_station.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 25 of file sensor.py.

◆ ATTR_STATION_ID

string homeassistant.components.nsw_fuel_station.sensor.ATTR_STATION_ID = "station_id"

Definition at line 27 of file sensor.py.

◆ ATTR_STATION_NAME

string homeassistant.components.nsw_fuel_station.sensor.ATTR_STATION_NAME = "station_name"

Definition at line 28 of file sensor.py.

◆ CONF_ALLOWED_FUEL_TYPES

list homeassistant.components.nsw_fuel_station.sensor.CONF_ALLOWED_FUEL_TYPES
Initial value:
1 = [
2  "E10",
3  "U91",
4  "E85",
5  "P95",
6  "P98",
7  "DL",
8  "PDL",
9  "B20",
10  "LPG",
11  "CNG",
12  "EV",
13 ]

Definition at line 32 of file sensor.py.

◆ CONF_DEFAULT_FUEL_TYPES

list homeassistant.components.nsw_fuel_station.sensor.CONF_DEFAULT_FUEL_TYPES = ["E10", "U91"]

Definition at line 45 of file sensor.py.

◆ CONF_FUEL_TYPES

string homeassistant.components.nsw_fuel_station.sensor.CONF_FUEL_TYPES = "fuel_types"

Definition at line 31 of file sensor.py.

◆ CONF_STATION_ID

string homeassistant.components.nsw_fuel_station.sensor.CONF_STATION_ID = "station_id"

Definition at line 30 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.nsw_fuel_station.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Required(CONF_STATION_ID): cv.positive_int,
4  vol.Optional(CONF_FUEL_TYPES, default=CONF_DEFAULT_FUEL_TYPES): vol.All(
5  cv.ensure_list, [vol.In(CONF_ALLOWED_FUEL_TYPES)]
6  ),
7  }
8 )

Definition at line 47 of file sensor.py.