@property
    def device_state_attributes(self):
        if self._battery:
            return {
                ATTR_BATTERY_LEVEL: self._battery,
            }
Return the state attributes.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/sensor/demo.py/DemoSensor.device_state_attributes