'Return the icon to use in the frontend, if any.'

@property
def icon(self):

    device_battery = self._device[ios.ATTR_BATTERY]
    battery_state = device_battery[ios.ATTR_BATTERY_STATE]
    battery_level = device_battery[ios.ATTR_BATTERY_LEVEL]
    rounded_level = round(battery_level, (-1))
    returning_icon_level = DEFAULT_ICON_LEVEL
    if (battery_state == ios.ATTR_BATTERY_STATE_FULL):
        returning_icon_level = DEFAULT_ICON_LEVEL
        if (battery_state == ios.ATTR_BATTERY_STATE_CHARGING):
            returning_icon_state = DEFAULT_ICON_STATE
        else:
            returning_icon_state = '{}-off'.format(DEFAULT_ICON_STATE)
    elif (battery_state == ios.ATTR_BATTERY_STATE_CHARGING):
        if (rounded_level in (20, 30, 40, 60, 80, 90, 100)):
            returning_icon_level = '{}-charging-{}'.format(DEFAULT_ICON_LEVEL, str(rounded_level))
            returning_icon_state = DEFAULT_ICON_STATE
        else:
            returning_icon_level = '{}-charging'.format(DEFAULT_ICON_LEVEL)
            returning_icon_state = DEFAULT_ICON_STATE
    elif (battery_state == ios.ATTR_BATTERY_STATE_UNPLUGGED):
        if (rounded_level < 10):
            returning_icon_level = '{}-outline'.format(DEFAULT_ICON_LEVEL)
            returning_icon_state = '{}-off'.format(DEFAULT_ICON_STATE)
        elif (battery_level > 95):
            returning_icon_state = '{}-off'.format(DEFAULT_ICON_STATE)
            returning_icon_level = '{}-outline'.format(DEFAULT_ICON_LEVEL)
        else:
            returning_icon_level = '{}-{}'.format(DEFAULT_ICON_LEVEL, str(rounded_level))
            returning_icon_state = '{}-off'.format(DEFAULT_ICON_STATE)
    elif (battery_state == ios.ATTR_BATTERY_STATE_UNKNOWN):
        returning_icon_level = '{}-unknown'.format(DEFAULT_ICON_LEVEL)
        returning_icon_state = '{}-unknown'.format(DEFAULT_ICON_LEVEL)
    if (self.type == 'state'):
        return returning_icon_state
    return returning_icon_level
