def brightness_value(self, value: int):
        """
        Set screen brightness values
        :param value: brightness value
        eg: d.brightness_value = 128
        """
        if not isinstance(value, int):
            raise ValueError("Brightness value must be an integer")
        if not 0 <= value <= 255:
            raise ValueError("Brightness value must be between 0 and 255")
        self.shell(f"settings put system screen_brightness {value}")

        Set screen brightness values
        :param value: brightness value
        eg: d.brightness_value = 128
        
adbutils/shell.py