Бытовая техника¶
KettleEntity¶
Умный чайник: управление температурой нагрева.
Sber Kettle entity -- maps HA water_heater entities to Sber kettle category.
Supports on/off control, water temperature reading, and target temperature setting.
KETTLE_CATEGORY
module-attribute
¶
Sber device category for kettle entities.
KettleEntity
¶
Bases: BaseEntity
Sber kettle entity for smart kettle devices.
Maps HA water_heater entities to the Sber 'kettle' category with support for: - On/off control - Current water temperature reading - Target temperature setting (60-100, step 10) - Child lock (read-only from HA attributes) - Water level and low water level indicators
Initialize kettle entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_data
|
dict
|
HA entity registry dict containing entity metadata. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/kettle.py
fill_by_ha_state
¶
Parse HA state and update kettle attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ha_state
|
dict
|
HA state dict with 'state' and 'attributes' keys. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/kettle.py
create_allowed_values_list
¶
Build allowed values map for temperature setting.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dict mapping feature key to its allowed INTEGER values descriptor. |
Source code in custom_components/sber_mqtt_bridge/devices/kettle.py
to_sber_current_state
¶
Build Sber current state payload with kettle attributes.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dict mapping entity_id to its Sber state representation. |
Source code in custom_components/sber_mqtt_bridge/devices/kettle.py
VacuumCleanerEntity¶
Робот-пылесос: режимы уборки, управление.
Sber Vacuum Cleaner entity -- maps HA vacuum entities to Sber vacuum_cleaner category.
Supports start/stop/pause/return_to_base commands, status reporting, cleaning program (fan speed), and battery level.
VACUUM_CLEANER_CATEGORY
module-attribute
¶
Sber device category for vacuum cleaner entities.
VacuumCleanerEntity
¶
Bases: BaseEntity
Sber vacuum cleaner entity for robot vacuum devices.
Maps HA vacuum entities to the Sber 'vacuum_cleaner' category with support for: - Start/stop/pause/return_to_base commands - Status reporting (cleaning, charging, docked, returning, error, paused) - Cleaning program (fan speed) - Battery percentage
Initialize vacuum cleaner entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_data
|
dict
|
HA entity registry dict containing entity metadata. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/vacuum_cleaner.py
fill_by_ha_state
¶
Parse HA state and update vacuum cleaner attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ha_state
|
dict
|
HA state dict with 'state' and 'attributes' keys. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/vacuum_cleaner.py
create_allowed_values_list
¶
Build allowed values map for vacuum features.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dict mapping feature key to its allowed ENUM values descriptor. |
Source code in custom_components/sber_mqtt_bridge/devices/vacuum_cleaner.py
to_sber_current_state
¶
Build Sber current state payload with vacuum attributes.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dict mapping entity_id to its Sber state representation. |
Source code in custom_components/sber_mqtt_bridge/devices/vacuum_cleaner.py
HumidifierEntity¶
Увлажнитель воздуха.
Sber Humidifier entity -- maps HA humidifier entities to Sber hvac_humidifier.
HUMIDIFIER_CATEGORY
module-attribute
¶
Sber device category for humidifier entities.
HA_TO_SBER_HUMIDIFIER_MODE
module-attribute
¶
HA_TO_SBER_HUMIDIFIER_MODE = {'auto': 'auto', 'low': 'low', 'mid': 'medium', 'medium': 'medium', 'high': 'high', 'silent': 'quiet', 'sleep': 'quiet', 'night': 'quiet', 'strong': 'turbo', 'boost': 'turbo'}
Map HA humidifier modes to Sber-standard enum values (case-insensitive lookup).
HumidifierEntity
¶
Bases: BaseEntity
Sber humidifier entity for humidity control devices.
Maps HA humidifier entities to the Sber 'hvac_humidifier' category with support for: - On/off control - Target humidity setting - Work mode selection (when supported by the device)
Initialize humidifier entity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entity_data
|
dict
|
HA entity registry dict containing entity metadata. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/humidifier.py
fill_by_ha_state
¶
Parse HA state and update all humidifier attributes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ha_state
|
dict
|
HA state dict with 'state' and 'attributes' keys. Attributes may include humidity, current_humidity, available_modes, and mode. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/humidifier.py
update_linked_data
¶
Inject current humidity from a linked sensor entity.
When the HA humidifier entity does not provide current_humidity
in its attributes, an external humidity sensor can be linked to
supply the value for the Sber humidity feature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
role
|
str
|
Link role name (only |
required |
ha_state
|
dict
|
HA state dict with 'state' containing the reading. |
required |
Source code in custom_components/sber_mqtt_bridge/devices/humidifier.py
create_allowed_values_list
¶
Build allowed values map for enum-based and integer-based features.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dict mapping feature key to its allowed values descriptor. |
Source code in custom_components/sber_mqtt_bridge/devices/humidifier.py
to_sber_current_state
¶
Build Sber current state payload with humidifier attributes.
Includes online, on_off, target humidity, work mode, and night mode when values are available.
Per Sber C2C specification, integer_value is serialized as a string.
Returns:
| Type | Description |
|---|---|
dict[str, dict]
|
Dict mapping entity_id to its Sber state representation. |