def de_unit_key(key: str) -> str:
    """Remove the unit from a key."""
    if key.endswith("f"):
        return key[:-1]
    if key.endswith("in"):
        return key[:-2]
    if key.endswith("mph"):
        return key[:-3]
    return key