mirror of
https://github.com/natekspencer/hacs-oasis_mini.git
synced 2025-12-06 18:44:14 -05:00
📝 Add docstrings to mqtt
Docstrings generation was requested by @natekspencer. * https://github.com/natekspencer/hacs-oasis_mini/pull/98#issuecomment-3568450288 The following files were modified: * `custom_components/oasis_mini/__init__.py` * `custom_components/oasis_mini/binary_sensor.py` * `custom_components/oasis_mini/button.py` * `custom_components/oasis_mini/config_flow.py` * `custom_components/oasis_mini/coordinator.py` * `custom_components/oasis_mini/entity.py` * `custom_components/oasis_mini/helpers.py` * `custom_components/oasis_mini/image.py` * `custom_components/oasis_mini/light.py` * `custom_components/oasis_mini/media_player.py` * `custom_components/oasis_mini/number.py` * `custom_components/oasis_mini/pyoasiscontrol/clients/cloud_client.py` * `custom_components/oasis_mini/pyoasiscontrol/clients/http_client.py` * `custom_components/oasis_mini/pyoasiscontrol/clients/mqtt_client.py` * `custom_components/oasis_mini/pyoasiscontrol/clients/transport.py` * `custom_components/oasis_mini/pyoasiscontrol/device.py` * `custom_components/oasis_mini/pyoasiscontrol/utils.py` * `custom_components/oasis_mini/select.py` * `custom_components/oasis_mini/sensor.py` * `custom_components/oasis_mini/switch.py` * `custom_components/oasis_mini/update.py` * `update_tracks.py`
This commit is contained in:
committed by
GitHub
parent
cf21a5d995
commit
4ef28fc741
@@ -22,7 +22,16 @@ class OasisDeviceEntity(CoordinatorEntity[OasisDeviceCoordinator]):
|
||||
device: OasisDevice,
|
||||
description: EntityDescription,
|
||||
) -> None:
|
||||
"""Construct an Oasis device entity."""
|
||||
"""
|
||||
Initialize an entity representing an Oasis device.
|
||||
|
||||
Sets the entity's unique_id from the device serial number and the provided description key, stores the given device on the entity, and constructs DeviceInfo containing identifiers, name, manufacturer, model, software version, and a network MAC connection if the device exposes a MAC address.
|
||||
|
||||
Parameters:
|
||||
coordinator: The coordinator responsible for updating the device state.
|
||||
device: OasisDevice instance providing metadata and identifiers (serial_number, mac_address, name, manufacturer, model, software_version).
|
||||
description: EntityDescription used to derive the entity key for the unique_id.
|
||||
"""
|
||||
super().__init__(coordinator)
|
||||
self.device = device
|
||||
self.entity_description = description
|
||||
@@ -42,4 +51,4 @@ class OasisDeviceEntity(CoordinatorEntity[OasisDeviceCoordinator]):
|
||||
model=device.model,
|
||||
serial_number=serial_number,
|
||||
sw_version=device.software_version,
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user