Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.flux.switch.FluxSwitch Class Reference
Inheritance diagram for homeassistant.components.flux.switch.FluxSwitch:
[legend]
Collaboration diagram for homeassistant.components.flux.switch.FluxSwitch:
[legend]

Public Member Functions

def __init__ (self, name, hass, lights, start_time, stop_time, start_colortemp, sunset_colortemp, stop_colortemp, brightness, disable_brightness_adjust, mode, interval, transition, unique_id)
 
None async_added_to_hass (self)
 
def async_flux_update (self, utcnow=None)
 
None async_turn_off (self, **Any kwargs)
 
None async_turn_on (self, **Any kwargs)
 
None async_will_remove_from_hass (self)
 
def find_start_time (self, now)
 
def find_stop_time (self, now)
 
def is_on (self)
 
def name (self)
 
- Public Member Functions inherited from homeassistant.helpers.restore_state.RestoreEntity
ExtraStoredData|None async_get_last_extra_data (self)
 
State|None async_get_last_state (self)
 
None async_internal_added_to_hass (self)
 
None async_internal_will_remove_from_hass (self)
 
ExtraStoredData|None extra_restore_state_data (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
dict[str, Any]|None capability_attributes (self)
 
str|None device_class (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
StateType state (self)
 
dict[str, Any]|None state_attributes (self)
 
str|None suggested_object_id (self)
 
int|None supported_features (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Public Attributes

 hass
 
 unsub_tracker
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 

Private Attributes

 _attr_unique_id
 
 _brightness
 
 _disable_brightness_adjust
 
 _interval
 
 _lights
 
 _mode
 
 _name
 
 _start_colortemp
 
 _start_time
 
 _stop_colortemp
 
 _stop_time
 
 _sunset_colortemp
 
 _transition
 

Additional Inherited Members

- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

Representation of a Flux switch.

Definition at line 184 of file switch.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.flux.switch.FluxSwitch.__init__ (   self,
  name,
  hass,
  lights,
  start_time,
  stop_time,
  start_colortemp,
  sunset_colortemp,
  stop_colortemp,
  brightness,
  disable_brightness_adjust,
  mode,
  interval,
  transition,
  unique_id 
)
Initialize the Flux switch.

Definition at line 187 of file switch.py.

Member Function Documentation

◆ async_added_to_hass()

None homeassistant.components.flux.switch.FluxSwitch.async_added_to_hass (   self)
Call when entity about to be added to hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 231 of file switch.py.

◆ async_flux_update()

def homeassistant.components.flux.switch.FluxSwitch.async_flux_update (   self,
  utcnow = None 
)
Update all the lights using flux.

Definition at line 267 of file switch.py.

◆ async_turn_off()

None homeassistant.components.flux.switch.FluxSwitch.async_turn_off (   self,
**Any  kwargs 
)
Turn off flux.

Definition at line 259 of file switch.py.

◆ async_turn_on()

None homeassistant.components.flux.switch.FluxSwitch.async_turn_on (   self,
**Any  kwargs 
)
Turn on flux.

Definition at line 243 of file switch.py.

◆ async_will_remove_from_hass()

None homeassistant.components.flux.switch.FluxSwitch.async_will_remove_from_hass (   self)
Run when entity will be removed from hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 237 of file switch.py.

◆ find_start_time()

def homeassistant.components.flux.switch.FluxSwitch.find_start_time (   self,
  now 
)
Return sunrise or start_time if given.

Definition at line 370 of file switch.py.

◆ find_stop_time()

def homeassistant.components.flux.switch.FluxSwitch.find_stop_time (   self,
  now 
)
Return dusk or stop_time if given.

Definition at line 380 of file switch.py.

◆ is_on()

def homeassistant.components.flux.switch.FluxSwitch.is_on (   self)
Return true if switch is on.

Definition at line 227 of file switch.py.

◆ name()

def homeassistant.components.flux.switch.FluxSwitch.name (   self)
Return the name of the device if any.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 222 of file switch.py.

Member Data Documentation

◆ _attr_unique_id

homeassistant.components.flux.switch.FluxSwitch._attr_unique_id
private

Definition at line 218 of file switch.py.

◆ _brightness

homeassistant.components.flux.switch.FluxSwitch._brightness
private

Definition at line 213 of file switch.py.

◆ _disable_brightness_adjust

homeassistant.components.flux.switch.FluxSwitch._disable_brightness_adjust
private

Definition at line 214 of file switch.py.

◆ _interval

homeassistant.components.flux.switch.FluxSwitch._interval
private

Definition at line 216 of file switch.py.

◆ _lights

homeassistant.components.flux.switch.FluxSwitch._lights
private

Definition at line 207 of file switch.py.

◆ _mode

homeassistant.components.flux.switch.FluxSwitch._mode
private

Definition at line 215 of file switch.py.

◆ _name

homeassistant.components.flux.switch.FluxSwitch._name
private

Definition at line 205 of file switch.py.

◆ _start_colortemp

homeassistant.components.flux.switch.FluxSwitch._start_colortemp
private

Definition at line 210 of file switch.py.

◆ _start_time

homeassistant.components.flux.switch.FluxSwitch._start_time
private

Definition at line 208 of file switch.py.

◆ _stop_colortemp

homeassistant.components.flux.switch.FluxSwitch._stop_colortemp
private

Definition at line 212 of file switch.py.

◆ _stop_time

homeassistant.components.flux.switch.FluxSwitch._stop_time
private

Definition at line 209 of file switch.py.

◆ _sunset_colortemp

homeassistant.components.flux.switch.FluxSwitch._sunset_colortemp
private

Definition at line 211 of file switch.py.

◆ _transition

homeassistant.components.flux.switch.FluxSwitch._transition
private

Definition at line 217 of file switch.py.

◆ hass

homeassistant.components.flux.switch.FluxSwitch.hass

Definition at line 206 of file switch.py.

◆ unsub_tracker

homeassistant.components.flux.switch.FluxSwitch.unsub_tracker

Definition at line 219 of file switch.py.


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