mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 01:24:29 +05:00
- add rgbw support
- add ws28 support - add transitions to pwm - add units of measurement for all i2c sensors - remove mqtt support
This commit is contained in:
@@ -97,20 +97,4 @@ class MegaBinarySensor(BinarySensorEntity, MegaPushEntity):
|
||||
|
||||
def _update(self, payload: dict):
|
||||
self.mega.values[self.port] = payload
|
||||
if not self.mega.mqtt_inputs:
|
||||
return
|
||||
|
||||
template: Template = self.customize.get(CONF_RESPONSE_TEMPLATE, None)
|
||||
if template is not None:
|
||||
template.hass = self.hass
|
||||
ret = template.async_render(payload)
|
||||
self.mega.lg.debug(f'response: %s', ret)
|
||||
self.hass.async_create_task(
|
||||
self.mega.request(pt=self.port, cmd=ret)
|
||||
)
|
||||
elif self.mega.force_d:
|
||||
self.mega.lg.debug(f'response d')
|
||||
self.hass.async_create_task(
|
||||
self.mega.request(pt=self.port, cmd='d')
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user