def on_off_command(self, details):
    'Send an on or off command to an appliance\n    \n    Sends the specified command to the homevision through netio interface to control the specified appliance.\n    \n    Args:\n      details: {"appliance": string, "state": string} \n    '
    if ('appliance' not in details):
        raise Exception('appliance not specified')
    elif ('state' not in details):
        raise Exception('state not specified')
    if (details['appliance'] not in self.on_off_appliance_codes.keys()):
        raise Exception(('appliance not supported. Must be one of: ' + ','.join(self.on_off_appliance_codes.keys())))
    appliance_code = self.on_off_appliance_codes[details['appliance']]
    if (details['state'] == 'ON'):
        self._switch_on(appliance_code)
    elif (details['state'] == 'OFF'):
        self._switch_off(appliance_code)
    else:
        raise Exception('state not supported. Must be either "ON" or "OFF".')
Send an on or off command to an appliance

Sends the specified command to the homevision through netio interface to control the specified appliance.

Args:
  details: {"appliance": string, "state": string}
def on_off_command(self, details):
    'Send an on or off command to an appliance\n    \n    Sends the specified command to the homevision through netio interface to control the specified appliance.\n    \n    Args:\n      details: {"appliance": string, "state": string} \n    '
    if ('appliance' not in details):
        raise Exception('appliance not specified')
    elif ('state' not in details):
        raise Exception('state not specified')
    if (details['appliance'] not in self.on_off_appliance_codes.keys()):
        raise Exception(('appliance not supported. Must be one of: ' + ','.join(self.on_off_appliance_codes.keys())))
    appliance_code = self.on_off_appliance_codes[details['appliance']]
    if (details['state'] == 'ON'):
        self._switch_on(appliance_code)
    elif (details['state'] == 'OFF'):
        self._switch_off(appliance_code)
    else:
        raise Exception('state not supported. Must be either "ON" or "OFF".')