Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
home_io_control.cover Namespace Reference

Functions

 device_supports_position_control (value)
 device_supports_vent (value)
 favorite_button_name (config)
 vent_button_name (config)
 silent_switch_name (config)
 _inject_companion_ids (config)
 to_code (config)

Variables

list DEPENDENCIES = ["home_io_control"]
str CONF_INVERT_POSITION = "invert_position"
str CONF_SILENT = "silent"
str CONF_SILENT_SWITCH_ID = "_silent_switch_id"
str CONF_OPTIMISTIC_STATE = "optimistic_state"
str CONF_FAVORITE_BUTTON_ID = "_favorite_button_id"
str CONF_VENT_BUTTON_ID = "_vent_button_id"
 IOHomeCover = home_io_control_ns.class_("IOHomeCover", cover.Cover, cg.Component)
 IOHomeCoverSilentSwitch
 IOHomeCoverCommandButton
 CoverCommand = home_io_control_ns.enum("CoverCommand", is_class=True)
dict POSITION_CONTROL_DEVICE_TYPES
dict VENT_DEVICE_TYPES
 CONFIG_SCHEMA

Function Documentation

◆ _inject_companion_ids()

_inject_companion_ids ( config)
protected
Declare cover companion entity IDs during schema validation for StaticVector sizing.

The favorite and ventilation buttons are cover-only and gated on device capability, so
their injection stays here. The always-present companion sensor IDs are delegated to the
shared helper. See platform_common.companion_id_base() for the StaticVector rationale.

Definition at line 119 of file cover.py.

Here is the call graph for this function:

◆ device_supports_position_control()

device_supports_position_control ( value)
Check if the given device type value supports 0-100% position control.

Definition at line 77 of file cover.py.

◆ device_supports_vent()

device_supports_vent ( value)
Check if the given device type value supports the ventilation command.

Definition at line 90 of file cover.py.

◆ favorite_button_name()

favorite_button_name ( config)
Derive the favorite-position button name from the parent cover name.

Definition at line 95 of file cover.py.

◆ silent_switch_name()

silent_switch_name ( config)
Derive the silent-operation switch name from the parent cover name.

Definition at line 111 of file cover.py.

◆ to_code()

to_code ( config)

Definition at line 171 of file cover.py.

Here is the call graph for this function:

◆ vent_button_name()

vent_button_name ( config)
Derive the ventilation-position button name from the parent cover name.

Definition at line 103 of file cover.py.

Variable Documentation

◆ CONF_FAVORITE_BUTTON_ID

str home_io_control.cover.CONF_FAVORITE_BUTTON_ID = "_favorite_button_id"

Definition at line 41 of file cover.py.

◆ CONF_INVERT_POSITION

str home_io_control.cover.CONF_INVERT_POSITION = "invert_position"

Definition at line 35 of file cover.py.

◆ CONF_OPTIMISTIC_STATE

str home_io_control.cover.CONF_OPTIMISTIC_STATE = "optimistic_state"

Definition at line 38 of file cover.py.

◆ CONF_SILENT

str home_io_control.cover.CONF_SILENT = "silent"

Definition at line 36 of file cover.py.

◆ CONF_SILENT_SWITCH_ID

str home_io_control.cover.CONF_SILENT_SWITCH_ID = "_silent_switch_id"

Definition at line 37 of file cover.py.

◆ CONF_VENT_BUTTON_ID

str home_io_control.cover.CONF_VENT_BUTTON_ID = "_vent_button_id"

Definition at line 42 of file cover.py.

◆ CONFIG_SCHEMA

home_io_control.cover.CONFIG_SCHEMA
Initial value:
= cv.All(
cover.cover_schema(IOHomeCover)
.extend(platform_schema_extension())
.extend({cv.Optional(CONF_INVERT_POSITION): cv.boolean})
.extend({cv.Optional(CONF_SILENT): cv.boolean})
.extend({cv.Optional(CONF_OPTIMISTIC_STATE, default=True): cv.boolean})
.extend(cv.COMPONENT_SCHEMA),
_inject_companion_ids,
)

Definition at line 160 of file cover.py.

◆ CoverCommand

home_io_control.cover.CoverCommand = home_io_control_ns.enum("CoverCommand", is_class=True)

Definition at line 54 of file cover.py.

◆ DEPENDENCIES

list home_io_control.cover.DEPENDENCIES = ["home_io_control"]

Definition at line 33 of file cover.py.

◆ IOHomeCover

home_io_control.cover.IOHomeCover = home_io_control_ns.class_("IOHomeCover", cover.Cover, cg.Component)

Definition at line 44 of file cover.py.

◆ IOHomeCoverCommandButton

home_io_control.cover.IOHomeCoverCommandButton
Initial value:
= home_io_control_ns.class_(
"IOHomeCoverCommandButton", button.Button, cg.Component
)

Definition at line 51 of file cover.py.

◆ IOHomeCoverSilentSwitch

home_io_control.cover.IOHomeCoverSilentSwitch
Initial value:
= home_io_control_ns.class_(
"IOHomeCoverSilentSwitch", switch.Switch, cg.Component
)

Definition at line 45 of file cover.py.

◆ POSITION_CONTROL_DEVICE_TYPES

dict home_io_control.cover.POSITION_CONTROL_DEVICE_TYPES
Initial value:
= {
0x01, # venetian_blind
0x02, # roller_shutter
0x03, # awning
0x04, # window_opener
0x05, # garage_opener
0x07, # gate_opener
0x08, # rolling_door_opener
0x0A, # blind
0x0B, # screen
0x0D, # dual_shutter
0x10, # horizontal_awning
0x11, # external_venetian_blind
0x12, # louvre_blind
0x13, # curtain_track
0x18, # swinging_shutter
}

Definition at line 58 of file cover.py.

◆ VENT_DEVICE_TYPES

dict home_io_control.cover.VENT_DEVICE_TYPES
Initial value:
= {
0x04, # window_opener
0x14, # ventilation_point
}

Definition at line 84 of file cover.py.