Skip to content

Commit

Permalink
Add #457: Battery optimization for solar cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
JurajNyiri committed Jul 20, 2024
1 parent 4cc1198 commit edc118a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 9 deletions.
50 changes: 42 additions & 8 deletions custom_components/tapo_control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,14 +480,48 @@ async def async_update_data():
if (
"basic_info"
in updateDataForAllControllers[controller]
and "power"
in updateDataForAllControllers[controller][
"basic_info"
]
and updateDataForAllControllers[controller][
"basic_info"
]["power"]
== "BATTERY"
and (
(
"power"
in updateDataForAllControllers[controller][
"basic_info"
]
and (
(
updateDataForAllControllers[
controller
]["basic_info"]["power"]
== "BATTERY"
)
or (
updateDataForAllControllers[
controller
]["basic_info"]["power"]
== "SOLAR"
)
)
)
or (
"power_mode"
in updateDataForAllControllers[controller][
"basic_info"
]
and (
(
updateDataForAllControllers[
controller
]["basic_info"]["power_mode"]
== "BATTERY"
)
or (
updateDataForAllControllers[
controller
]["basic_info"]["power_mode"]
== "SOLAR"
)
)
)
)
)
else False
)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tapo_control/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"codeowners": [
"@JurajNyiri"
],
"version": "5.4.27",
"version": "5.4.28",
"requirements": [
"pytapo==3.3.23"
],
Expand Down

0 comments on commit edc118a

Please sign in to comment.