Skip to content

Commit

Permalink
 fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilP committed Oct 31, 2023
1 parent 80129c0 commit 00b64e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/deltadore-tydom/tydom/tydom_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ async def put_data(self, path, name, value):
body: str
if value is None:
body = '{"' + name + '":"null}'
elif type(value)==bool or type(value)==int:
elif isinstance(value, bool) or isinstance(value, int):
body = '{"' + name + '":"' + str(value).lower() + '}'
else:
body = '{"' + name + '":"' + value + '"}'
Expand All @@ -516,7 +516,7 @@ async def put_devices_data(self, device_id, endpoint_id, name, value):
body: str
if value is None:
body = '[{"name":"' + name + '","value":null}]'
elif type(value)==bool:
elif isinstance(value, bool):
body = '[{"name":"' + name + '","value":' + str(value).lower() + '}]'
else:
body = '[{"name":"' + name + '","value":"' + value + '"}]'
Expand Down

0 comments on commit 00b64e3

Please sign in to comment.