Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor Class Reference
Inheritance diagram for homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor:
[legend]
Collaboration diagram for homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor:
[legend]

Public Member Functions

def __init__ (self, config_entry_id, config_unique_id, config_title, manager)
 
None async_added_to_hass (self)
 
None async_update (self)
 
None async_will_remove_from_hass (self)
 
def extra_state_attributes (self)
 
def icon (self)
 
str|None name (self)
 
def native_unit_of_measurement (self)
 
def native_value (self)
 
str unique_id (self)
 
- Public Member Functions inherited from homeassistant.components.sensor.SensorEntity
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
None async_internal_added_to_hass (self)
 
None async_registry_entry_updated (self)
 
dict[str, Any]|None capability_attributes (self)
 
SensorDeviceClass|None device_class (self)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
datetime|None last_reset (self)
 
list[str]|None options (self)
 
Any state (self)
 
dict[str, Any]|None state_attributes (self)
 
SensorStateClass|str|None state_class (self)
 
int|None suggested_display_precision (self)
 
str|None suggested_unit_of_measurement (self)
 
str|None unit_of_measurement (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)
 
bool assumed_state (self)
 
None async_device_update (self, bool warning=True)
 
None async_internal_will_remove_from_hass (self)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
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)
 
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)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
bool has_entity_name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
int|None supported_features (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (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)
 

Private Member Functions

def _update_from_status_info (self, status_info)
 
def _update_status_callback (self)
 

Private Attributes

 _config_entry_id
 
 _config_title
 
 _config_unique_id
 
 _created
 
 _last_timestamp
 
 _last_update
 
 _last_update_successful
 
 _manager
 
 _remove_signal_status
 
 _removed
 
 _status
 
 _total
 
 _updated
 

Static Private Attributes

bool _attr_should_poll = False
 

Additional Inherited Members

- Public Attributes inherited from homeassistant.components.sensor.SensorEntity
 entity_category
 
 registry_entry
 
 unit_of_measurement
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 
- Static Public Attributes inherited from homeassistant.components.sensor.SensorEntity
 Decimal
 
 None
 
 UndefinedType
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Detailed Description

Status sensor for the GeoNet NZ Quakes integration.

Definition at line 43 of file sensor.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.__init__ (   self,
  config_entry_id,
  config_unique_id,
  config_title,
  manager 
)
Initialize entity.

Definition at line 48 of file sensor.py.

Member Function Documentation

◆ _update_from_status_info()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._update_from_status_info (   self,
  status_info 
)
private
Update the internal state from the provided information.

Definition at line 94 of file sensor.py.

◆ _update_status_callback()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._update_status_callback (   self)
private
Call status update method.

Definition at line 81 of file sensor.py.

◆ async_added_to_hass()

None homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.async_added_to_hass (   self)
Call when entity is added to hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 64 of file sensor.py.

◆ async_update()

None homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.async_update (   self)
Update this entity from the data held in the feed manager.

Definition at line 86 of file sensor.py.

◆ async_will_remove_from_hass()

None homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.async_will_remove_from_hass (   self)
Call when entity will be removed from hass.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 75 of file sensor.py.

◆ extra_state_attributes()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.extra_state_attributes (   self)
Return the device state attributes.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 138 of file sensor.py.

◆ icon()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.icon (   self)
Return the icon to use in the frontend, if any.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 128 of file sensor.py.

◆ name()

str | None homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.name (   self)
Return the name of the entity.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 123 of file sensor.py.

◆ native_unit_of_measurement()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.native_unit_of_measurement (   self)
Return the unit of measurement.

Reimplemented from homeassistant.components.sensor.SensorEntity.

Definition at line 133 of file sensor.py.

◆ native_value()

def homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.native_value (   self)
Return the state of the sensor.

Reimplemented from homeassistant.components.sensor.SensorEntity.

Definition at line 113 of file sensor.py.

◆ unique_id()

str homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor.unique_id (   self)
Return a unique ID containing latitude/longitude.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 118 of file sensor.py.

Member Data Documentation

◆ _attr_should_poll

bool homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._attr_should_poll = False
staticprivate

Definition at line 46 of file sensor.py.

◆ _config_entry_id

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._config_entry_id
private

Definition at line 50 of file sensor.py.

◆ _config_title

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._config_title
private

Definition at line 52 of file sensor.py.

◆ _config_unique_id

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._config_unique_id
private

Definition at line 51 of file sensor.py.

◆ _created

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._created
private

Definition at line 59 of file sensor.py.

◆ _last_timestamp

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._last_timestamp
private

Definition at line 57 of file sensor.py.

◆ _last_update

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._last_update
private

Definition at line 55 of file sensor.py.

◆ _last_update_successful

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._last_update_successful
private

Definition at line 56 of file sensor.py.

◆ _manager

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._manager
private

Definition at line 53 of file sensor.py.

◆ _remove_signal_status

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._remove_signal_status
private

Definition at line 62 of file sensor.py.

◆ _removed

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._removed
private

Definition at line 61 of file sensor.py.

◆ _status

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._status
private

Definition at line 54 of file sensor.py.

◆ _total

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._total
private

Definition at line 58 of file sensor.py.

◆ _updated

homeassistant.components.geonetnz_quakes.sensor.GeonetnzQuakesSensor._updated
private

Definition at line 60 of file sensor.py.


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