def map_vera_device(vera_device, remap):
 import pyvera as veraApi
 if isinstance(vera_device, veraApi.VeraDimmer):
  return 'light'
 if isinstance(vera_device, veraApi.VeraBinarySensor):
  return 'binary_sensor'
 if isinstance(vera_device, veraApi.VeraSensor):
  return 'sensor'
 if isinstance(vera_device, veraApi.VeraArmableDevice):
  return 'switch'
 if isinstance(vera_device, veraApi.VeraLock):
  return 'lock'
 if isinstance(vera_device, veraApi.VeraThermostat):
  return 'climate'
 if isinstance(vera_device, veraApi.VeraCurtain):
  return 'cover'
 if isinstance(vera_device, veraApi.VeraSwitch):
  if (vera_device.device_id in remap):
   return 'light'
  else:
   return 'switch'
 return None

def map_vera_device ( vera_device , remap ) : import pyvera as veraApi if isinstance ( vera_device , veraApi . VeraDimmer ) : return 'light' if isinstance ( vera_device , veraApi . VeraBinarySensor ) : return 'binary_sensor' if isinstance ( vera_device , veraApi . VeraSensor ) : return 'sensor' if isinstance ( vera_device , veraApi . VeraArmableDevice ) : return 'switch' if isinstance ( vera_device , veraApi . VeraLock ) : return 'lock' if isinstance ( vera_device , veraApi . VeraThermostat ) : return 'climate' if isinstance ( vera_device , veraApi . VeraCurtain ) : return 'cover' if isinstance ( vera_device , veraApi . VeraSwitch ) : if ( vera_device . device_id in remap ) : return 'light' else : return 'switch' return None
map vera classes to ha types .