<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_battery_level(value):
 """Validate that value is a valid battery level integer."""

    try:
        value = percent_int(value)
        return value
    except vol.Invalid:
        _LOGGER.warning(
            '%s is not a valid battery level, falling back to battery level 0',
            value)
        return 0