You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To operate the component with mopeds from China, the address app-api.niu.com is used.
To obtain a link to the images, use the address app-api.niucache.com
Tell. how to fix the link in the camera.py file to get the image correctly. For other sensors, I corrected the link in the const.py file. all sensors work correctly.
Previously, I used another component in which a picture with a route was displayed. It is no longer supported in the current version of home assistant.
To operate the component with mopeds from China, the address app-api.niu.com is used.
To obtain a link to the images, use the address app-api.niucache.com
Tell. how to fix the link in the camera.py file to get the image correctly. For other sensors, I corrected the link in the const.py file. all sensors work correctly.
Previously, I used another component in which a picture with a route was displayed. It is no longer supported in the current version of home assistant.
cod of getting url for track image
def dataTrack(self, id_field): if id_field == "startTime" or id_field == "endTime": return datetime.fromtimestamp( (self._dataTrackInfo["data"][0][id_field]) / 1000 ).strftime("%Y-%m-%d %H:%M:%S") if id_field == "ridingtime": return strftime( "%H:%M:%S", gmtime(self._dataTrackInfo["data"][0][id_field]) ) if id_field == "track_thumb": thumburl = self._dataTrackInfo["data"][0][id_field].replace( "app-api.niucache.com", "app-api.niu.com" ) #return thumburl.replace("/track/thumb/", "/track/overseas/thumb/") return thumburl return self._dataTrackInfo["data"][0][id_field]
The text was updated successfully, but these errors were encountered: