Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Mix Light 51 #1837

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions custom_components/localtuya/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
HVACMode.AUTO: "Auto",
},
"MANUAL/AUTO": {
HVAC_MODE_HEAT: "MANUAL",
HVAC_MODE_AUTO: "AUTO",
HVACMode.HEAT: "MANUAL",
HVACMode.AUTO: "AUTO",
},
"Manual/Program": {
HVACMode.HEAT: "Manual",
Expand Down Expand Up @@ -117,8 +117,8 @@
HVACAction.IDLE: "Warming",
},
"heating/warming": {
CURRENT_HVAC_HEAT: "heating",
CURRENT_HVAC_IDLE: "warming",
HVACAction.HEATING: "heating",
HVACAction.IDLE: "warming",
},
}
HVAC_FAN_MODE_SETS = {
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 @@ -19,7 +19,7 @@
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
dispatcher_send,
)
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.restore_state import RestoreEntity
Expand Down Expand Up @@ -127,7 +127,7 @@ def async_config_entry_by_device_id(hass, device_id):
if device_id in entry.data.get(CONF_DEVICES, []):
return entry
else:
_LOGGER.warning(f"Missing device configuration for device_id {device_id}")
_LOGGER.debug(f"Missing device configuration for device_id {device_id}")
return None


Expand Down Expand Up @@ -348,13 +348,13 @@ def status_updated(self, status):

def _dispatch_status(self):
signal = f"localtuya_{self._dev_config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, self._status)
dispatcher_send(self._hass, signal, self._status)

@callback
def disconnected(self):
"""Device disconnected."""
signal = f"localtuya_{self._dev_config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self._hass, signal, None)
dispatcher_send(self._hass, signal, None)
if self._unsub_interval is not None:
self._unsub_interval()
self._unsub_interval = None
Expand Down Expand Up @@ -422,7 +422,7 @@ def _update_handler(status):
)

signal = f"localtuya_entity_{self._dev_config_entry[CONF_DEVICE_ID]}"
async_dispatcher_send(self.hass, signal, self.entity_id)
dispatcher_send(self.hass, signal, self.entity_id)

@property
def extra_state_attributes(self):
Expand Down
Loading