Skip to content

Devices

devices

Device objects, one class per family of idDevicemodel.

The app picks a device's screen from idDevicemodel (and remoteControlCode, the sub-model), never from idDevicetype. Every action ends up as an (action, param) request resolved against the device's own command list (see aioteleco.commands).

DEVICE_MODELS module-attribute

DEVICE_MODELS: dict[int, tuple[str, str]] = {
    16: ("LMP", "On/off"),
    17: ("DIM", "Dimmer"),
    18: ("HEA", "Heater"),
    19: ("FAN", "Fan"),
    20: ("HEQ", "Heater 4 channels"),
    21: ("PER", "Rolling shutter"),
    22: ("CAN", "Gate"),
    23: ("SER", "Garage door"),
    24: ("SOL", "Awning"),
    25: ("TEN", "Screen"),
    26: ("RGB", "RGB light (presets)"),
    27: ("PEG", "Pergola adjustable slats"),
    28: ("AUD", "Audio"),
    31: ("PEQ", "Pergola slats (open/stop/close)"),
    32: ("COP", "RGB light"),
    33: ("DYP", "Tunable white light"),
    34: ("DMS", "Dimmer (slider)"),
    41: ("", "Generic remote (buttons)"),
    42: ("", "Generic remote (sliders)"),
    43: ("GAK", "Garage door (ask)"),
    44: ("RAS", "Retractable slats"),
    45: ("ARS", "Automatic retractable slats"),
    46: ("CRP", "RGB light (color rotation)"),
    47: ("WIN", "Window"),
}

RGB_PRESETS module-attribute

RGB_PRESETS = (
    "RED",
    "GREEN",
    "BLUE",
    "MILK",
    "CYAN",
    "YELLOW",
    "PURPLE",
    "WHITE",
)

DeviceFamily

Bases: StrEnum

SWITCH class-attribute instance-attribute

SWITCH = 'switch'

LIGHT class-attribute instance-attribute

LIGHT = 'light'

DIMMER class-attribute instance-attribute

DIMMER = 'dimmer'

RGB_LIGHT class-attribute instance-attribute

RGB_LIGHT = 'rgb_light'

WHITE_LIGHT class-attribute instance-attribute

WHITE_LIGHT = 'white_light'

HEATER class-attribute instance-attribute

HEATER = 'heater'

FAN class-attribute instance-attribute

FAN = 'fan'

COVER class-attribute instance-attribute

COVER = 'cover'

SLATS class-attribute instance-attribute

SLATS = 'slats'

AUDIO class-attribute instance-attribute

AUDIO = 'audio'

GENERIC class-attribute instance-attribute

GENERIC = 'generic'

Device

Device(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Any device of an installation.

family class-attribute

hub instance-attribute

hub = hub

installation instance-attribute

installation = installation

room instance-attribute

room = room

info instance-attribute

info = info

status instance-attribute

status: dict[str, str] = {}

id property

id: int

name property

name: str

model property

model: int

model_name property

model_name: str

unique_id property

unique_id: str

supports

supports(action: str, param: str | None = None) -> bool

Does the device's command list contain this action (and param)?

send async

send(action: str, param: str) -> SendResult

Send a raw (action, param) request.

refresh async

refresh() -> dict[str, str]

update_status

update_status(items: list[StatusItem]) -> None

OnOffDevice

OnOffDevice(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Device

family class-attribute instance-attribute

is_on property

is_on: bool | None

turn_on async

turn_on() -> SendResult

turn_off async

turn_off() -> SendResult

Light

Light(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: OnOffDevice

family class-attribute instance-attribute

Dimmer

Dimmer(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Light

Dimmers / heaters with 4 steps (POWER LEV1..LEV4) or a 0-100 LEVEL.

family class-attribute instance-attribute

level property

level: int | None

has_continuous_level property

has_continuous_level: bool

Only slider dimmers (model 34) take a free 0-100 level; the others have 4 steps.

set_step async

set_step(step: int) -> SendResult

set_level async

set_level(level: int) -> SendResult

Brightness 0..100; 0 turns the device off.

Slider dimmers (model 34) get the value itself (LEVEL <n>), like the app's slider. Stepped dimmers get the nearest step (25/50/75/100): they also list a parametric LEVEL command, but the box ignores it for them.

Heater

Heater(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Dimmer

family class-attribute instance-attribute

Fan

Fan(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: OnOffDevice

family class-attribute instance-attribute

family = DeviceFamily.FAN

set_speed async

set_speed(speed: int) -> SendResult

ColorLight

ColorLight(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Light

RGB (32, 46) and tunable-white (33) lights driven by an ARGB string.

family class-attribute instance-attribute

color property

color: tuple[tuple[int, int, int], int] | None

set_color async

set_color(
    rgb: tuple[int, int, int], brightness: int = 100
) -> SendResult

WhiteLight

WhiteLight(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: ColorLight

family class-attribute instance-attribute

PresetRgbLight

PresetRgbLight(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Light

Model 26: 8 preset colors + color cycle.

family class-attribute instance-attribute

preset property

preset: str | None

set_preset async

set_preset(name: str) -> SendResult

cycle async

cycle() -> SendResult

TravelTimes dataclass

TravelTimes(open: float, close: float)

Full-travel durations of a cover, in seconds (see teleco cover calibrate).

open instance-attribute

open: float

close instance-attribute

close: float

Cover

Cover(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Device

Open/stop/close devices: shutters, awnings, screens, gates, windows...

The box only takes OPEN, STOP and CLOSE. With travel_times set, travel_to reaches any position by timing a move then sending STOP, and position follows an estimate of where the cover is.

family class-attribute instance-attribute

travel_times instance-attribute

travel_times: TravelTimes | None = None

state property

state: str | None

OPEN, CLOSE, STOP or None (unknown / moving).

position property

position: int | None

Open percentage: the timed estimate when there is one, else as the app shows it.

The app (OpenStopCloseDeviceActionFragment) shows LEVEL while OPEN, 0 when CLOSE (whatever LEVEL says) and nothing when stopped midway.

estimated_position property

estimated_position: float | None

Position computed from the moves sent by this object (needs travel times).

direction property

direction: int

+1 while opening, -1 while closing, 0 otherwise (moves sent by this object).

A move counts as over once its full travel time has elapsed (needs travel_times; without them a move lasts until the next command).

is_closed property

is_closed: bool | None

restore_position

restore_position(percent: float | None) -> None

Seed the position estimate, e.g. from the last state saved by Home Assistant.

update_status

update_status(items: list[StatusItem]) -> None

open async

open() -> SendResult

close async

close() -> SendResult

stop async

stop() -> SendResult

set_position async

set_position(percent: int) -> SendResult | None

Timed move with travel_to (covers have no position command).

travel_to async

travel_to(percent: int) -> None

Reach percent (0 closed .. 100 open) by timing a move, then STOP.

Needs travel_times. From an unknown position the cover first closes completely. Timing is only as good as the latency between the two commands: the local channel is much more precise than the cloud.

Slats

Slats(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: Cover

Pergola slats with steps 0/33/66/100 (models 27, 44, 45).

family class-attribute instance-attribute

STEPS class-attribute

STEPS: tuple[int, ...] = (0, 33, 66, 100)

position property

position: int | None

retracted property

retracted: bool | None

set_position async

set_position(percent: int) -> SendResult

Move to the nearest step (the app only offers 0/33/66/100).

Audio

Audio(
    hub: TelecoHub,
    installation: Installation,
    room: Room,
    info: DeviceInfo,
)

Bases: OnOffDevice

family class-attribute instance-attribute

play_pause async

play_pause(play: bool) -> SendResult

action async

action(name: str) -> SendResult

VOLUME_UP, VOLUME_DOWN, REWIND or FORWARD.

color_string

color_string(
    rgb: tuple[int, int, int], brightness: int
) -> str

AxxxRxxxGxxxBxxx (A = brightness 0-100), as built by Utils.

parse_color

parse_color(
    value: str,
) -> tuple[tuple[int, int, int], int] | None

Parse AxxxRxxxGxxxBxxx into ((r, g, b), brightness).

device_class

device_class(info: DeviceInfo) -> type[Device]

Pick the class for a device (DeviceFactory#castDevice).