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

Classes

class  SeasonSensorEntity
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 
str|None get_season (date current_date, str hemisphere, str season_tracking_type)
 

Variables

string EQUATOR = "equator"
 
dictionary HEMISPHERE_SEASON_SWAP
 
string NORTHERN = "northern"
 
string SOUTHERN = "southern"
 
string STATE_AUTUMN = "autumn"
 
string STATE_SPRING = "spring"
 
string STATE_SUMMER = "summer"
 
string STATE_WINTER = "winter"
 

Detailed Description

Support for Season sensors.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.season.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback  async_add_entities 
)
Set up the platform from config entry.

Definition at line 37 of file sensor.py.

◆ get_season()

str | None homeassistant.components.season.sensor.get_season ( date  current_date,
str  hemisphere,
str   season_tracking_type 
)
Calculate the current season.

Definition at line 52 of file sensor.py.

Variable Documentation

◆ EQUATOR

string homeassistant.components.season.sensor.EQUATOR = "equator"

Definition at line 19 of file sensor.py.

◆ HEMISPHERE_SEASON_SWAP

dictionary homeassistant.components.season.sensor.HEMISPHERE_SEASON_SWAP
Initial value:
1 = {
2  STATE_WINTER: STATE_SUMMER,
3  STATE_SPRING: STATE_AUTUMN,
4  STATE_AUTUMN: STATE_SPRING,
5  STATE_SUMMER: STATE_WINTER,
6 }

Definition at line 29 of file sensor.py.

◆ NORTHERN

string homeassistant.components.season.sensor.NORTHERN = "northern"

Definition at line 21 of file sensor.py.

◆ SOUTHERN

string homeassistant.components.season.sensor.SOUTHERN = "southern"

Definition at line 23 of file sensor.py.

◆ STATE_AUTUMN

string homeassistant.components.season.sensor.STATE_AUTUMN = "autumn"

Definition at line 24 of file sensor.py.

◆ STATE_SPRING

string homeassistant.components.season.sensor.STATE_SPRING = "spring"

Definition at line 25 of file sensor.py.

◆ STATE_SUMMER

string homeassistant.components.season.sensor.STATE_SUMMER = "summer"

Definition at line 26 of file sensor.py.

◆ STATE_WINTER

string homeassistant.components.season.sensor.STATE_WINTER = "winter"

Definition at line 27 of file sensor.py.