def temp_to_hex(value: int) -> str:
    """Convert an int to a 2-byte hex string."""
    if value is None:
        return "7FFF"  # or: "31FF"?
    if value is False:
        return "7EFF"
    temp = int(value * 100)
    if temp < 0:
        temp += 2 ** 16
    return f"{temp:04X}"