def parse_path(root_dir):
    base_dir, last_dir, position = '', '', 0
    if root_dir:
        base_dir, last_dir = os.path.split(root_dir)
        position = -len(last_dir) if last_dir else 0
    return base_dir, last_dir, position
True if sensor is on.
dataset/ETHPy150Open j-bennet/wharfee/wharfee/helpers.py/parse_path--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/binary_sensor/wemo.py/WemoBinarySensor.is_on