switchbot_utility package
Submodules
switchbot_utility.battery_mixin module
switchbot_utility.command_mixin module
switchbot_utility.onoff_mixin module
switchbot_utility.switchbot module
- class switchbot_utility.switchbot.Switchbot
ベースクラス:
objectSwitchbot Utility class
- devicelist() None
Create all Switchbot device list as deviceList.txt
- gen_sign() dict
Generate Switchbot API v1.1 sign header
Returns: Switchbot API v1.1 sign header
- get_scene_list() None
Get scene List as sceneList.txt
- read_token() tuple
Import access token and secret from settings.json
- scene_execute(sceneId: str) str
Execute scene
switchbot_utility.switchbot_air_purifier_pm25 module
- class switchbot_utility.switchbot_air_purifier_pm25.SwitchbotAirPurifierPM25(deviceId)
ベースクラス:
SwitchbotAirPurifierVOCSwitchbot Air Purifier PM2.5 class
switchbot_utility.switchbot_air_purifier_pm25_table module
- class switchbot_utility.switchbot_air_purifier_pm25_table.SwitchbotAirPurifierPM25Table(deviceId)
ベースクラス:
SwitchbotAirPurifierVOCSwitchbot Air Purifier PM2.5 Table class
switchbot_utility.switchbot_air_purifier_voc module
- class switchbot_utility.switchbot_air_purifier_voc.SwitchbotAirPurifierVOC(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixinSwitchbot Air Purifier VOC class
- get_childLock() int
Return if child lock is on or off
- 戻り値:
0 for "disabled", 1 for "enabled"
- 戻り値の型:
int
- get_mode() int
Return the current mode
- 戻り値:
1, normal or fan mode; 2, auto mode; 3, sleep mode; 4, pet mode
- 戻り値の型:
int
- get_power() str
Return current state; ON, on; OFF, off
- 戻り値:
"on" or "off"
- 戻り値の型:
str
- set_mode(mode: int, fanLevel: int) str
Set mode
- パラメータ:
mode (int) -- 1, normal or fan mode; 2, auto mode; 3, sleep mode; 4, pet mode
fanLevel (int) -- 1-3 fan level can only be set if mode is set to 1
- 戻り値:
result
- 戻り値の型:
str
switchbot_utility.switchbot_air_purifier_voc_table module
- class switchbot_utility.switchbot_air_purifier_voc_table.SwitchbotAirPurifierVOCTable(deviceId)
ベースクラス:
SwitchbotAirPurifierVOCSwitchbot Air Purifier VOC Table class
switchbot_utility.switchbot_blind_tilt module
- class switchbot_utility.switchbot_blind_tilt.SwitchbotBlindTilt(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixinSwitchbot Blind Tilt class
- close_down() str
Set the position of Blind Tilt to closed down.
- 戻り値:
result
- 戻り値の型:
str
- close_up() str
Set the position of Blind Tilt to closed up.
- 戻り値:
result
- 戻り値の型:
str
- fully_open() str
Set the position of Blind Tilt to open.
- 戻り値:
result
- 戻り値の型:
str
- get_direction() str
Return the opening direction of a Blind Tilt device
- 戻り値:
result
- 戻り値の型:
str
- get_slide_position() int
Return the current position, 0-100.
- 戻り値:
current position
- 戻り値の型:
int
- set_position(direction: str, position: int) str
Set blind position.
- パラメータ:
direction (str) -- up/down
position (int) -- 0~100
closed (0 means)
open (100 means)
example (it MUST be set to a multiple of 2.for)
36 (up;48 or up;)
- 戻り値:
result
- 戻り値の型:
str
switchbot_utility.switchbot_bot module
- class switchbot_utility.switchbot_bot.SwitchbotBot(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixin,BatteryMixinSwitchbot bot class
- get_power() dict
Returns ON/OFF state
- press() str
press action
switchbot_utility.switchbot_ceiling_light module
- class switchbot_utility.switchbot_ceiling_light.SwitchbotCeilingLight(deviceId)
ベースクラス:
SwitchbotColorBulbSwitchbot Ceiling Light class
- get_brightness()
Returns the brightness value, range from 1 to 100
- get_color_temperature()
Returns the color temperature value, range from 2700 to 6500
- get_power()
Returns ON/OFF state
- set_color(r, g, b)
Do nothing
switchbot_utility.switchbot_ceiling_light_pro module
- class switchbot_utility.switchbot_ceiling_light_pro.SwithbotCeilingLightPro(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot Ceiling Light class
switchbot_utility.switchbot_color_bulb module
- class switchbot_utility.switchbot_color_bulb.SwitchbotColorBulb(deviceId)
ベースクラス:
SwitchbotStripLightSwitchbot Color Bulb class
- get_color_temperature() dict
Returns the color temperature value, range from 2700 to 6500
- set_color_temperature(temperature: int) str
Set color temperature
switchbot_utility.switchbot_contact_sensor module
- class switchbot_utility.switchbot_contact_sensor.SwitchbotContactSensor(deviceId)
ベースクラス:
SwitchbotMotionSensorSwitchbot Contact Sensor class
- get_open_state() dict
Returns the open state of the sensor
switchbot_utility.switchbot_curtain module
- class switchbot_utility.switchbot_curtain.SwitchbotCurtain(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixin,BatteryMixinSwitchbot Curtain class
- close() str
Aliase of turn off command
- get_calibrate() bool
determines if the open position and the close position of a device have been properly calibrated or not
- 戻り値:
True if the device has been calibrated, False otherwise
- 戻り値の型:
bool
- get_curtain_position() dict
Returns curtain position 0(open) to 100(close)
- get_group() bool
determines if a Curtain is paired with or grouped with another Curtain or not
- 戻り値:
True if the device is part of a group, False otherwise
- 戻り値の型:
bool
- get_master() bool
determines if a Curtain is the master device or not when paired with or grouped with another Curtain
- 戻り値:
True if the device is the master device in a group, False otherwise
- 戻り値の型:
bool
- open() str
Aliase of turn on command
- set_position(position: int) str
Set curtain position 0-100%
arg: position curtain position 0-100%
switchbot_utility.switchbot_curtain3 module
- class switchbot_utility.switchbot_curtain3.SwitchbotCurtain3(deviceId)
ベースクラス:
SwitchbotCurtainSwitchbot Curtain 3 class
switchbot_utility.switchbot_device module
- class switchbot_utility.switchbot_device.SwitchbotDevice(deviceId)
ベースクラス:
Switchbot,CommandMixinSwitchbot device class
- get_status() dict
Get device information
switchbot_utility.switchbot_evapolative_humidifier module
- class switchbot_utility.switchbot_evapolative_humidifier.SwitchbotEvapolativeHumidifier(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixinSwitchBot Evapolative Humidifier.
- get_childLock() bool
Get child lock status.
- get_drying() bool
Get drying status.
- get_effectiveUsageHours() int
Get effective usage hours.
- get_humidity() int
Get humidity.
- get_mode() int
Get mode.
1: Level4 2: Level3 3: Level2 4: Level1 5: humidity mode 6: sleep mode 7: auto mode 8: drying mode
- get_power() str
Get power status.
- get_usedHours() int
Get used hours.
- setChildLock(lock: bool) str
Set child lock.
- パラメータ:
lock (bool) -- True to lock, False to unlock
- 戻り値:
Result of the command
- 戻り値の型:
str
- setMode(mode: int, targetHumidity: int) str
Set mode.
- パラメータ:
mode (int) -- Mode to set
1 -- Level4
2 -- Level3
3 -- Level2
4 -- Level1
5 -- humidity mode
6 -- sleep mode
7 -- auto mode
8 -- drying mode
targetHumidity (int) -- Target humidity (0-100)
- 戻り値:
Result of the command
- 戻り値の型:
str
switchbot_utility.switchbot_evapolative_humidifier_autorefill module
- class switchbot_utility.switchbot_evapolative_humidifier_autorefill.SwitchbotEvapolativeHumidifierAutoRefill(deviceId)
ベースクラス:
SwitchbotEvapolativeHumidifierSwitchbot Evapolative Humidifier Auto Refill class
switchbot_utility.switchbot_floor_cleaning_robot_s10 module
- class switchbot_utility.switchbot_floor_cleaning_robot_s10.SwitchbotFloorCleaningRobotS10(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixinSwitchbot Floor Cleaning Robot S10 class
- addWaterForHumi() str
Refill the mind blowing Evaporative Humidifier (Auto-refill).
- 戻り値:
Result of the command
- 戻り値の型:
str
- changeParam(fanLevel: int, waterLevel: int, times: int) str
Change the fan level and water level during cleaning
- パラメータ:
fanLevel (int) -- Vacuum level (1-4)
waterLevel (int) -- Mop moisture level (1-2)
times (int) -- Number of cleaning cycles (1-2639999)
- 戻り値:
Result of the command
- 戻り値の型:
str
- dock() str
Return to Auto-empty Station and charge.
- 戻り値:
Result of the command
- 戻り値の型:
str
- get_online_status() str
Get current online status
- 戻り値:
Current online status
- 戻り値の型:
str
- get_task_type() str
Get current task type
- 戻り値:
Current task type
- 戻り値の型:
str
- get_water_base_battery() int
Get water base battery level
- 戻り値:
Water base battery level
- 戻り値の型:
int
- get_working_status() str
Get current working status
- 戻り値:
Current working status
- 戻り値の型:
str
- pause() str
Pause cleaning
- 戻り値:
Result of the command
- 戻り値の型:
str
- selfClean(mode: int) str
Start self-cleaning
- パラメータ:
1 (mode)
mop. (wash the)
2 (mode)
itself. (dry)
3 (mode)
terminate
- 戻り値:
Result of the command
- 戻り値の型:
str
- setVolume(volume: int) str
Set the volume (1-100)
- パラメータ:
volume (int) -- Volume level (0-100)
- 戻り値:
Result of the command
- 戻り値の型:
str
- startClean(action: str, fanLevel: int, waterLevel: int, times: int) str
Start cleaning
- パラメータ:
action (str) -- cleaning mode, sweep or sweep_mop
fanLevel (int) -- Vacuum level (1-4)
waterLevel (int) -- Mop moisture level (1-2)
times (int) -- Number of cleaning cycles (1-2639999)
- 戻り値:
Result of the command
- 戻り値の型:
str
switchbot_utility.switchbot_floor_cleaning_robot_s20 module
- class switchbot_utility.switchbot_floor_cleaning_robot_s20.SwitchbotFloorCleaningRobotS20(deviceId)
ベースクラス:
SwitchbotFloorCleaningRobotS10Switchbot Floor Cleaning Robot S20 class
switchbot_utility.switchbot_floor_lamp module
- class switchbot_utility.switchbot_floor_lamp.SwitchbotFloorLamp(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot Floor Lamp class
switchbot_utility.switchbot_hub2 module
- class switchbot_utility.switchbot_hub2.SwitchbotHub2(deviceId)
ベースクラス:
SwitchbotDeviceSwitchbot Hub2 class
- get_humidity() str
Returns humidity from Hub2
- get_light_level() int
Returns the level of illuminance of the ambience light, 1~20
- get_temperature() str
Returns temperature from Hub2
switchbot_utility.switchbot_hub3 module
- class switchbot_utility.switchbot_hub3.SwitchbotHub3(deviceId)
ベースクラス:
SwitchbotHub2Switchbot Hub3 class
- get_moveDetected() bool
determines if motion is detected
- 戻り値:
True if motion is detected, False otherwise
- 戻り値の型:
bool
- get_onlineStatus() str
the connection status of the device.
- 戻り値:
online or offline
switchbot_utility.switchbot_humidifier module
- class switchbot_utility.switchbot_humidifier.SwitchbotHumidifier(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixinSwitchbot Humicifier class
- get_auto()
Returns if a Humidifier is in Auto Mode or not
- get_child_lock()
Returns if a Humidifier's safety lock is on or not
- get_humidity()
Returns humidity percentage
- get_lack_water()
Returns if the water tank is empty or not
- get_nebulization_efficiency()
Returns atomization efficiency percentage
- get_power()
Returns ON/OFF state
- get_sound()
Returns if a Humidifier is muted or not
- get_temperature()
Returns temperature in celsius
- set_mode(mode: int)
Set device mode
switchbot_utility.switchbot_ir_air_conditioner module
- class switchbot_utility.switchbot_ir_air_conditioner.IrAirConditioner(deviceId)
ベースクラス:
SwitchbotIrDeviceSwitchbot virtual ir Air Conditioner
- set_all(temperature: int, mode: int, fan_speed: int, power_state: str) str
Set the unit of temperature is in celsius
- パラメータ:
temperature -- temperature in celsius
mode -- 1(auto), 2(cool), 3(dry), 4(fan), 5(heat)
fan_speed -- 1(auto), 2(low), 3(medium), 4(high)
power_state -- 'on' or 'off' (must be quoted)
e.g. set_all(26,1, 3, 'on')
switchbot_utility.switchbot_ir_device module
- class switchbot_utility.switchbot_ir_device.SwitchbotIrDevice(deviceId)
ベースクラス:
Switchbot,OnOffMixin,CommandMixinSwitchbot virtual ir device
switchbot_utility.switchbot_ir_dvd_speaker module
- class switchbot_utility.switchbot_ir_dvd_speaker.IrDvd(deviceId)
ベースクラス:
SwitchbotIrDeviceSwitchbot virtual ir Tv
- fast_forward() str
Fast forward
- next_track() str
Next track
- pause() str
Pause
- play() str
Play/resume
- previous() str
Last track
- rewind() str
Rewind
- set_mute() str
Mute/unmute
- stop() str
Stop
switchbot_utility.switchbot_ir_fan module
switchbot_utility.switchbot_ir_light module
- class switchbot_utility.switchbot_ir_light.IrLight(deviceId)
ベースクラス:
SwitchbotIrDeviceSwitchbot virtual IR Light
- brightness_down() str
Brightness down
- brightness_up() str
Brightness up
switchbot_utility.switchbot_ir_others module
- class switchbot_utility.switchbot_ir_others.IrOthers(deviceId)
ベースクラス:
SwitchbotDeviceIR virtual device others class
- customize(button_name: str) str
Execute customized button
- パラメータ:
button_name (str)
switchbot_utility.switchbot_ir_tv_ipstreamer_stb module
- class switchbot_utility.switchbot_ir_tv_ipstreamer_stb.IrSetTopBox(deviceId)
ベースクラス:
IrTvSet Top Box class
switchbot_utility.switchbot_k10_plus_pro_combo module
- class switchbot_utility.switchbot_k10_plus_pro_combo.SwitchbotK10PlusProCombo(deviceId)
ベースクラス:
SwitchbotFloorCleaningRobotS10Switchbot Floor Cleaning Robot K10 Plus Pro Combo class
switchbot_utility.switchbot_k11_plus module
- class switchbot_utility.switchbot_k11_plus.SwitchbotK11Plus(deviceId)
ベースクラス:
SwitchbotFloorCleaningRobotS10Switchbot Floor Cleaning Robot K11 Plus class
switchbot_utility.switchbot_k20_plus_pro module
- class switchbot_utility.switchbot_k20_plus_pro.SwitchbotK20PlusPro(deviceId)
ベースクラス:
SwitchbotFloorCleaningRobotS10Switchbot Floor Cleaning Robot K20 Plus Pro class
switchbot_utility.switchbot_keypad module
- class switchbot_utility.switchbot_keypad.SwitchbotKeypad(deviceId)
ベースクラス:
SwitchbotDeviceSwitchbot Keypad class
- create_key(name: str, type_: str, password: str) str
Create a new passcode(permanent or urgent)
- パラメータ:
name -- passcode name
type -- type of passcode permanent or urgent
password -- a 6 to 12-digit passcode in plain text
- create_key_limited(name: str, type_: str, password: str, start_time: str, end_time: str) str
Create a new passcode(timiLimit or disposable)
- パラメータ:
name -- passcode name
type -- type of passcode timeLimit or disposable
password -- a 6 to 12-digit passcode in plain text
start_time -- start time like 2000/12/31 23:59:15
end_time -- end time like start_time
- delete_key(keyId: str) str
- key_list() None
Get keypad key list to file
switchbot_utility.switchbot_keypad_touch module
- class switchbot_utility.switchbot_keypad_touch.SwitchbotKeypadTouch(deviceId)
ベースクラス:
SwitchbotKeypadSwitchbot Keypad touch class
switchbot_utility.switchbot_keypad_vision module
- class switchbot_utility.switchbot_keypad_vision.SwitchbotKeypadVision(deviceId)
ベースクラス:
SwitchbotKeypadSwitchbot Keypad vision class
switchbot_utility.switchbot_keypad_vision_pro module
- class switchbot_utility.switchbot_keypad_vision_pro.SwitchbotKeypadVisionPro(deviceId)
ベースクラス:
SwitchbotKeypadSwitchbot Keypad vision pro class
switchbot_utility.switchbot_lock module
- class switchbot_utility.switchbot_lock.SwitchbotLock(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixinSwitchbot Lock class
- deadbolt() str
Disengage deadbolt or latch
- get_door_state() str
Returns if closed or not
- get_lock_state() str
Returns if locked or not
- lock() str
Lock a lock
- unlock() str
Unlock a lock
switchbot_utility.switchbot_lock_lite module
- class switchbot_utility.switchbot_lock_lite.SwitchbotLockLite(deviceId)
ベースクラス:
SwitchbotLockSwitchbot Lock Lite class
- deadbolt()
Do Nothing, because Switchbot Lock Lite does not have a deadbolt or latch
- get_door_state() str
Do Nothing, because Switchbot Lock Lite does not have a door sensor
switchbot_utility.switchbot_lock_pro module
- class switchbot_utility.switchbot_lock_pro.SwitchbotLockPro(deviceId)
ベースクラス:
SwitchbotLockSwitchbot Lock Pro class
switchbot_utility.switchbot_lock_ultra module
- class switchbot_utility.switchbot_lock_ultra.SwitchbotLockUltra(deviceId)
ベースクラス:
SwitchbotLockSwitchbot Lock Ultra class
switchbot_utility.switchbot_meter module
- class switchbot_utility.switchbot_meter.SwitchbotMeter(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixinSwitchbot meter class
- get_humidity() str
Returns humidity from meter
- get_temperature() str
Returns temperature from meter
switchbot_utility.switchbot_meter_plus module
- class switchbot_utility.switchbot_meter_plus.SwitchbotMeterPlus(deviceId)
ベースクラス:
SwitchbotMeterSwitchbot Meter Plus class
switchbot_utility.switchbot_meter_pro module
- class switchbot_utility.switchbot_meter_pro.SwitchbotMeterPro(deviceId)
ベースクラス:
SwitchbotMeterSwitchbot Meter Pro class
switchbot_utility.switchbot_meter_pro_co2 module
- class switchbot_utility.switchbot_meter_pro_co2.SwitchbotMeterProCO2(deviceId)
ベースクラス:
SwitchbotMeterSwitchbot Meter Pro CO2 class
- get_co2() dict
Returns the CO2 level of the sensor
switchbot_utility.switchbot_mini_robot_vacuum_k10_plus module
- class switchbot_utility.switchbot_mini_robot_vacuum_k10_plus.SwitchbotMiniRobotVacuumK10Plus(deviceId)
ベースクラス:
SwitchbotRobotVacuumCleanerS1Switchbot Mini Robot Vacuum K10 Plus class
switchbot_utility.switchbot_mini_robot_vacuum_k10_plus_pro module
- class switchbot_utility.switchbot_mini_robot_vacuum_k10_plus_pro.SwitchbotMiniRobotVacuumK10PlusPro(deviceId)
ベースクラス:
SwitchbotRobotVacuumCleanerS1Switchbot Mini Robot Vacuum K10 Plus Pro class
switchbot_utility.switchbot_motion_sensor module
- class switchbot_utility.switchbot_motion_sensor.SwitchbotMotionSensor(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixinSwitchbot Motion Sensor class
- get_brightness() str
Returns ambient brightness picked up by the sensor
- get_move_detected() str
Returns if move detected
switchbot_utility.switchbot_outdoor_meter module
- class switchbot_utility.switchbot_outdoor_meter.SwitchbotOutdoorMeter(deviceId)
ベースクラス:
SwitchbotMeterSwitchbot Outdoor Meter class
switchbot_utility.switchbot_plug module
- class switchbot_utility.switchbot_plug.SwitchbotPlug(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixinSwitchbot Plug class
- get_power() str
Returns device power status
switchbot_utility.switchbot_plug_mini_eu module
- class switchbot_utility.switchbot_plug_mini_eu.SwitchbotPlugMiniEU(deviceId)
ベースクラス:
SwitchbotPlugMiniUSSwitchbot Plug Mini(EU) class
switchbot_utility.switchbot_plug_mini_jp module
- class switchbot_utility.switchbot_plug_mini_jp.SwitchbotPlugMiniJP(deviceId)
ベースクラス:
SwitchbotPlugMiniUSSwitchbot Plug Mini(US) class
switchbot_utility.switchbot_plug_mini_us module
- class switchbot_utility.switchbot_plug_mini_us.SwitchbotPlugMiniUS(deviceId)
ベースクラス:
SwitchbotPlugSwitchbot Plug Mini(US) class
- get_electric_current() str
Returns the current of the device at the moment, measured in Amp
- get_electricity_of_day() str
Returns the duration that device has been used during a day(min)
- get_voltage() str
Returns the voltage of the device, measured in Volt
- get_weight() str
Returns the power consumed in a day, measured in Watts
- toggle() str
Toggle plug state
switchbot_utility.switchbot_presence_sensor module
- class switchbot_utility.switchbot_presence_sensor.SwitchbotPresenceSensor(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixin- get_detected() bool
determines if human is detected
Returns: True/False
- get_lightLevel() int
Returns the level of illuminance of the ambience light
Returns: 1-20
switchbot_utility.switchbot_rgbic_neon_wire_light module
- class switchbot_utility.switchbot_rgbic_neon_wire_light.SwitchbotRGBICNeonWireLight(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot RGBIC Neon Wire Light class
switchbot_utility.switchbot_rgbic_neon_wire_rope_light module
- class switchbot_utility.switchbot_rgbic_neon_wire_rope_light.SwitchbotRGBICNeonWireRopeLight(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot RGBIC Neon Wire Rope Light class
switchbot_utility.switchbot_rgbicww_floor_lamp module
- class switchbot_utility.switchbot_rgbicww_floor_lamp.SwitchbotRGBICWWFloorLamp(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot RGBICWW Floor Lamp class
switchbot_utility.switchbot_rgbicww_strip_light module
- class switchbot_utility.switchbot_rgbicww_strip_light.SwitchbotRGBICWWStripLight(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot RGBICWW Strip Light class
switchbot_utility.switchbot_robot_vacuum_cleaner_s1 module
- class switchbot_utility.switchbot_robot_vacuum_cleaner_s1.SwitchbotRobotVacuumCleanerS1(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixinSwitchbot Robot Vacuum Cleaner S1 class
- dock() str
Return to charging dock
- get_online_status() str
Returns the connection status of the device
- get_working_status() str
Returns the working status of the device
- power_level(powerlevel: int) str
Set suction power level
arg: 0-3
- start() str
Start vacuuming
- stop() str
Stop vacuuming
switchbot_utility.switchbot_robot_vacuum_cleaner_s1_plus module
- class switchbot_utility.switchbot_robot_vacuum_cleaner_s1_plus.SwitchbotRobotVacuumCleanerS1Plus(deviceId)
ベースクラス:
SwitchbotRobotVacuumCleanerS1Switchbot Vacuum Cleaner S1 Plus class
switchbot_utility.switchbot_roller_shade module
- class switchbot_utility.switchbot_roller_shade.SwitchbotRollerShade(deviceId)
ベースクラス:
SwitchbotDevice,BatteryMixinSwitchbot Roller Shade class
- get_calibrate() str
determines if the open and the closed positions have been properly calibrated or not
- get_moving() str
determines if the device is moving or not
- get_slidePosition() int
the current position of the roller shade 0-100%
Returns: 0-100
- set_position(position: int) str
Set roller shade position 0-100%
arg: position roller shade position 0-100%
switchbot_utility.switchbot_strip_light module
- class switchbot_utility.switchbot_strip_light.SwitchbotStripLight(deviceId)
ベースクラス:
SwitchbotDevice,OnOffMixinSwitchbot Strip Light class
- get_brightness() str
Returns the brightness value, range from 1 to 100
- get_color() str
Returns the color value, RGB '255:255:255'
- get_power() str
Returns ON/OFF state
- set_brightness(brightness: int) str
Set brightness
- set_color(r: int, g: int, b: int) str
Set color
args: r_value, g_value, b_value 0-255
- toggle() str
Toggle state
switchbot_utility.switchbot_strip_light3 module
- class switchbot_utility.switchbot_strip_light3.SwitchbotStripLight3(deviceId)
ベースクラス:
SwitchbotCeilingLightSwitchbot Strip Light 3 class
switchbot_utility.switchbot_water_leak_detector module
- class switchbot_utility.switchbot_water_leak_detector.SwitchbotWaterLeakDetector(deviceId)
ベースクラス:
BatteryMixin,SwitchbotDeviceSwitchbot Water Leak Detector class
- get_water_leak_state() dict
Returns the water leak state of the sensor
switchbot_utility.switchbot_webhook module
- class switchbot_utility.switchbot_webhook.SwitchbotWebhook
ベースクラス:
Switchbot- delete_webhook(url: str) str
Delete webhook
- http_request(url: str, headers: dict, data: dict)
- query_details(url: str) str
Get webhook detail configurations
- query_url() str
Get webhook configuration
- setup_webhook(url: str) str
Setup Webhook
- update_webhook(url: str, enable: bool) str
Update webhook url