hass-core/homeassistant/components/broadlink/const.py
Felipe Martins Diel a365f456fc
Add support to the new Broadlink RM Mini 3 and RM4 Series (#32523)
* Add device type

* Use snake_case for devtype

Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>

* Validate device type as positive int

* Add device type 0x5f36 to switch

* Use default type for sensors

* Add RM4 to switch platform

* Use snake_case for devtype

* Support multiple types of remote

* Validate ip address

* Improve code readability

* Add const.py to .coveragerc

* Use None for unknown device types

* Fix sensors and standardize platform schemas

* Fix if statement

Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
2020-04-19 01:16:49 +02:00

38 lines
711 B
Python

"""Constants for broadlink platform."""
CONF_PACKET = "packet"
DEFAULT_LEARNING_TIMEOUT = 20
DEFAULT_NAME = "Broadlink"
DEFAULT_PORT = 80
DEFAULT_RETRY = 3
DEFAULT_TIMEOUT = 5
DOMAIN = "broadlink"
SERVICE_LEARN = "learn"
SERVICE_SEND = "send"
A1_TYPES = ["a1"]
MP1_TYPES = ["mp1"]
RM_TYPES = [
"rm",
"rm2",
"rm_mini",
"rm_mini_shate",
"rm_pro_phicomm",
"rm2_home_plus",
"rm2_home_plus_gdt",
"rm2_pro_plus",
"rm2_pro_plus2",
"rm2_pro_plus_bl",
]
RM4_TYPES = [
"rm_mini3_newblackbean",
"rm_mini3_redbean",
"rm4_mini",
"rm4_pro",
"rm4c_mini",
"rm4c_pro",
]
SP1_TYPES = ["sp1"]
SP2_TYPES = ["sp2", "honeywell_sp2", "sp3", "spmini2", "spminiplus"]