Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions homeassistant/components/tuya.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD)
from homeassistant.const import (CONF_USERNAME, CONF_PASSWORD, CONF_PLATFORM)
from homeassistant.helpers import discovery
from homeassistant.helpers.dispatcher import (
dispatcher_send, async_dispatcher_connect)
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.event import track_time_interval

REQUIREMENTS = ['tuyapy==0.1.2']
REQUIREMENTS = ['tuyapy==0.1.3']

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -45,7 +45,8 @@
DOMAIN: vol.Schema({
vol.Required(CONF_PASSWORD): cv.string,
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_COUNTRYCODE): cv.string
vol.Required(CONF_COUNTRYCODE): cv.string,
vol.Optional(CONF_PLATFORM, default='tuya'): cv.string,
})
}, extra=vol.ALLOW_EXTRA)

Expand All @@ -58,9 +59,10 @@ def setup(hass, config):
username = config[DOMAIN][CONF_USERNAME]
password = config[DOMAIN][CONF_PASSWORD]
country_code = config[DOMAIN][CONF_COUNTRYCODE]
platform = config[DOMAIN][CONF_PLATFORM]

hass.data[DATA_TUYA] = tuya
tuya.init(username, password, country_code)
tuya.init(username, password, country_code, platform)
hass.data[DOMAIN] = {
'entities': {}
}
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ tplink==0.2.1
transmissionrpc==0.11

# homeassistant.components.tuya
tuyapy==0.1.2
tuyapy==0.1.3

# homeassistant.components.twilio
twilio==5.7.0
Expand Down