Example #1
0
 async def async_set_hvac_mode(self, hvac_mode):
     """Set new target hvac mode."""
     if hvac_mode == HVAC_MODE_OFF:
         await self._gateway.send(
             OWNHeatingCommand.set_mode(where=self._zone,
                                        mode=CLIMATE_MODE_OFF,
                                        standalone=self._standalone))
     elif hvac_mode == HVAC_MODE_AUTO:
         await self._gateway.send(
             OWNHeatingCommand.set_mode(where=self._zone,
                                        mode=CLIMATE_MODE_AUTO,
                                        standalone=self._standalone))
     elif hvac_mode == HVAC_MODE_HEAT:
         if self._target_temperature is not None:
             await self._gateway.send(
                 OWNHeatingCommand.set_temperature(
                     where=self._zone,
                     temperature=self._target_temperature,
                     mode=CLIMATE_MODE_HEAT,
                     standalone=self._standalone))
     elif hvac_mode == HVAC_MODE_COOL:
         if self._target_temperature is not None:
             await self._gateway.send(
                 OWNHeatingCommand.set_temperature(
                     where=self._zone,
                     temperature=self._target_temperature,
                     mode=CLIMATE_MODE_COOL,
                     standalone=self._standalone))
Example #2
0
 async def async_set_temperature(self, **kwargs):
     """Set new target temperature."""
     target_temperature = kwargs.get(
         "temperature", self._local_target_temperature) - self._local_offset
     if self._hvac_mode == HVAC_MODE_HEAT:
         await self._gateway.send(
             OWNHeatingCommand.set_temperature(
                 where=self._zone,
                 temperature=target_temperature,
                 mode=CLIMATE_MODE_HEAT,
                 standalone=self._standalone))
     elif self._hvac_mode == HVAC_MODE_COOL:
         await self._gateway.send(
             OWNHeatingCommand.set_temperature(
                 where=self._zone,
                 temperature=target_temperature,
                 mode=CLIMATE_MODE_COOL,
                 standalone=self._standalone))
     else:
         await self._gateway.send(
             OWNHeatingCommand.set_temperature(
                 where=self._zone,
                 temperature=target_temperature,
                 mode=CLIMATE_MODE_AUTO,
                 standalone=self._standalone))
Example #3
0
    async def async_update(self):
        """Update the entity.

        Only used by the generic entity update service.
        """
        await self._gateway.send_status_request(
            OWNHeatingCommand.status(self._zone))