def numeric_state(hass, entity, below=None, above=None, value_template=None,
                  variables=None):
    """Test a numeric state condition."""
    if isinstance(entity, str):
        entity = hass.states.get(entity)

    if entity is None:
        return False

    if value_template is None:
        value = entity.state
    else:
        variables = dict(variables or {})
        variables['state'] = entity
        try:
            value = render(hass, value_template, variables)
        except TemplateError as ex:
            _LOGGER.error(ex)
            return False

    try:
        value = float(value)
    except ValueError:
        _LOGGER.warning("Value cannot be processed as a number: %s", value)
        return False

    print(below, value, above)

    if below is not None and value > below:
        return False

    if above is not None and value < above:
        return False

    return True
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/helpers/condition.py/numeric_state/original