Skip to content

Commit

Permalink
Merge pull request rospogrigio#712 from Daandeve/master
Browse files Browse the repository at this point in the history
rospogrigio#711 Implemented m/p HVAC mode set
  • Loading branch information
rospogrigio authored and github-actions[bot] committed Nov 29, 2022
2 parents fb0bdc5 + 831ae55 commit d24d95d
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 21 deletions.
4 changes: 4 additions & 0 deletions custom_components/localtuya/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
HVAC_MODE_HEAT: "Manual",
HVAC_MODE_AUTO: "Program",
},
"m/p": {
HVAC_MODE_HEAT: "m",
HVAC_MODE_AUTO: "p",
},
"True/False": {
HVAC_MODE_HEAT: True,
},
Expand Down
10 changes: 5 additions & 5 deletions custom_components/localtuya/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@

from . import pytuya
from .const import (
ATTR_STATE,
ATTR_UPDATED_AT,
CONF_DEFAULT_VALUE,
CONF_LOCAL_KEY,
CONF_MODEL,
CONF_PASSIVE_ENTITY,
CONF_PROTOCOL_VERSION,
CONF_RESET_DPIDS,
CONF_RESTORE_ON_RECONNECT,
DATA_CLOUD,
DOMAIN,
TUYA_DEVICES,
CONF_DEFAULT_VALUE,
ATTR_STATE,
CONF_RESTORE_ON_RECONNECT,
CONF_RESET_DPIDS,
CONF_PASSIVE_ENTITY,
)

_LOGGER = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/localtuya/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
CONF_DPS_STRINGS,
CONF_EDIT_DEVICE,
CONF_LOCAL_KEY,
CONF_MANUAL_DPS,
CONF_MODEL,
CONF_NO_CLOUD,
CONF_PRODUCT_NAME,
Expand All @@ -45,7 +46,6 @@
DATA_DISCOVERY,
DOMAIN,
PLATFORMS,
CONF_MANUAL_DPS,
)
from .discovery import discover

Expand Down
2 changes: 1 addition & 1 deletion custom_components/localtuya/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
CONF_FAN_DIRECTION,
CONF_FAN_DIRECTION_FWD,
CONF_FAN_DIRECTION_REV,
CONF_FAN_DPS_TYPE,
CONF_FAN_ORDERED_LIST,
CONF_FAN_OSCILLATING_CONTROL,
CONF_FAN_SPEED_CONTROL,
CONF_FAN_SPEED_MAX,
CONF_FAN_SPEED_MIN,
CONF_FAN_DPS_TYPE,
)

_LOGGER = logging.getLogger(__name__)
Expand Down
7 changes: 3 additions & 4 deletions custom_components/localtuya/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
from homeassistant.const import CONF_DEVICE_CLASS, STATE_UNKNOWN

from .common import LocalTuyaEntity, async_setup_entry

from .const import (
CONF_MIN_VALUE,
CONF_MAX_VALUE,
CONF_DEFAULT_VALUE,
CONF_MAX_VALUE,
CONF_MIN_VALUE,
CONF_PASSIVE_ENTITY,
CONF_RESTORE_ON_RECONNECT,
CONF_STEPSIZE_VALUE,
CONF_PASSIVE_ENTITY,
)

_LOGGER = logging.getLogger(__name__)
Expand Down
10 changes: 3 additions & 7 deletions custom_components/localtuya/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@

import voluptuous as vol
from homeassistant.components.select import DOMAIN, SelectEntity
from homeassistant.const import (
CONF_DEVICE_CLASS,
STATE_UNKNOWN,
)
from homeassistant.const import CONF_DEVICE_CLASS, STATE_UNKNOWN

from .common import LocalTuyaEntity, async_setup_entry

from .const import (
CONF_DEFAULT_VALUE,
CONF_OPTIONS,
CONF_OPTIONS_FRIENDLY,
CONF_DEFAULT_VALUE,
CONF_RESTORE_ON_RECONNECT,
CONF_PASSIVE_ENTITY,
CONF_RESTORE_ON_RECONNECT,
)


Expand Down
6 changes: 3 additions & 3 deletions custom_components/localtuya/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
from .const import (
ATTR_CURRENT,
ATTR_CURRENT_CONSUMPTION,
ATTR_VOLTAGE,
ATTR_STATE,
ATTR_VOLTAGE,
CONF_CURRENT,
CONF_CURRENT_CONSUMPTION,
CONF_VOLTAGE,
CONF_DEFAULT_VALUE,
CONF_RESTORE_ON_RECONNECT,
CONF_PASSIVE_ENTITY,
CONF_RESTORE_ON_RECONNECT,
CONF_VOLTAGE,
)

_LOGGER = logging.getLogger(__name__)
Expand Down

0 comments on commit d24d95d

Please sign in to comment.