miio.gateway.alarm module

Xiaomi Gateway Alarm implementation.

class miio.gateway.alarm.Alarm(parent: Gateway = None)[source]

Bases: miio.gateway.gatewaydevice.GatewayDevice

Class representing the Xiaomi Gateway Alarm.

arming_time() int[source]

Return time in seconds the alarm stays ‘oning’ before transitioning to ‘on’.

last_status_change_time() datetime.datetime[source]

Return the last time the alarm changed status.

off()[source]

Turn alarm off.

on()[source]

Turn alarm on.

set_arming_time(seconds)[source]

Set time the alarm stays at ‘oning’ before transitioning to ‘on’.

set_triggering_light(seconds)[source]

Set the time the gateway light blinks when the alarm is triggerd.

set_triggering_time(seconds)[source]

Set the time in seconds the alarm is going off when triggered.

set_triggering_volume(volume)[source]

Set the volume level at which alarms go off [0-100].

status() str[source]

Return the alarm status from the device.

subscribe_events()[source]

subscribe to the alarm events using the push server.

triggering_light() int[source]

Return the time the gateway light blinks when the alarm is triggerd.

triggering_time() int[source]

Return the time in seconds the alarm is going off when triggered.

triggering_volume() int[source]

Return the volume level at which alarms go off [0-100].

unsubscribe_events()[source]

Unsubscibe from events registered in the gateway memory.