'Update the model, from a sent tellcore command and data.'

def _update_model_from_command(self, tellcore_command, tellcore_data):

    from tellcore.constants import TELLSTICK_TURNON, TELLSTICK_TURNOFF, TELLSTICK_DIM
    if (tellcore_command not in [TELLSTICK_TURNON, TELLSTICK_TURNOFF, TELLSTICK_DIM]):
        _LOGGER.debug('Unhandled    tellstick    command:    %d', tellcore_command)
        return
    self._update_model((tellcore_command != TELLSTICK_TURNOFF), self._parse_tellcore_data(tellcore_data))
