platypush/plugins/zigbee/mqtt/__init__.py
def device_check_ota_updates(self, device: str, **kwargs) -> dict:
        """
        Check if the specified device has any OTA updates available to install.

        :param device: Address or friendly name of the device.
        :param kwargs: Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
            (default: query the default configured device).

        :return:

            .. code-block:: json

                {
                    "id": "<device ID>",
                    "update_available": true,
                    "status": "ok"
                }

        """
        ret = self._parse_response(
            self.publish(topic=self._topic('bridge/request/device/ota_update/check'),
                         reply_topic=self._topic('bridge/response/device/ota_update/check'),
                         msg={'id': device}, **self._mqtt_args(**kwargs)))

        return {
            'status': ret['status'],
            'id': ret.get('data', {}).get('id'),
            'update_available': ret.get('data', {}).get('update_available', False),
        }

        Check if the specified device has any OTA updates available to install.

        :param device: Address or friendly name of the device.
        :param kwargs: Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
            (default: query the default configured device).

        :return:

            .. code-block:: json

                {
                    "id": "<device ID>",
                    "update_available": true,
                    "status": "ok"
                }

        
Check if the specified device has any OTA updates available to install.
Check if the specified device has any OTA updates available to install .
def device_check_ota_updates(self, device: str, **kwargs) -> dict:
        ret = self._parse_response(
            self.publish(topic=self._topic('bridge/request/device/ota_update/check'),
                         reply_topic=self._topic('bridge/response/device/ota_update/check'),
                         msg={'id': device}, **self._mqtt_args(**kwargs)))
        return {
            'status': ret['status'],
            'id': ret.get('data', {}).get('id'),
            'update_available': ret.get('data', {}).get('update_available', False),
        }
def device_check_ota_updates ( self , device : str , ** kwargs ) -> dict : ret = self . _parse_response ( self . publish ( topic = self . _topic ( 'bridge/request/device/ota_update/check' ) , reply_topic = self . _topic ( 'bridge/response/device/ota_update/check' ) , msg = { 'id' : device } , ** self . _mqtt_args ( ** kwargs ) ) ) return { 'status' : ret [ 'status' ] , 'id' : ret . get ( 'data' , { } ) . get ( 'id' ) , 'update_available' : ret . get ( 'data' , { } ) . get ( 'update_available' , False ) , }
Check if the specified device has any OTA updates available to install.
Check if the specified device has any OTA updates available to install .
"""
        Check if the specified device has any OTA updates available to install.

        :param device: Address or friendly name of the device.
        :param kwargs: Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
            (default: query the default configured device).

        :return:

            .. code-block:: json

                {
                    "id": "<device ID>",
                    "update_available": true,
                    "status": "ok"
                }

        """
code-block:: json
{
"id": "",
"update_available": true,
"status": "ok"
}
code - block :: json { " id " : " " " update_available " : true " status " : " ok " }
self
device
str
Address or friendly name of the device.
Address or friendly name of the device .
kwargs
Extra arguments to be passed to :meth:`platypush.plugins.mqtt.MqttPlugin.publish``
(default: query the default configured device).
Extra arguments to be passed to : meth : ` platypush . plugins . mqtt . MqttPlugin . publish ` ` ( default : query the default configured device ) .