Skip to content

Commit d0c676e

Browse files
committed
Small ATO fixes
1 parent d827691 commit d0c676e

3 files changed

Lines changed: 1 addition & 9 deletions

File tree

custom_components/redsea/button.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class ReefWaveButtonEntityDescription(ButtonEntityDescription):
248248
key="resume",
249249
translation_key="resume",
250250
exists_fn=lambda _: True,
251-
press_fn=lambda device: device.push_values(source="/resume", method="post"),
251+
press_fn=lambda device: cast(ReefATOCoordinator, device).resume(),
252252
icon="mdi:play-circle-outline",
253253
entity_category=EntityCategory.CONFIG,
254254
),

custom_components/redsea/reefbeat/ato.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ def __init__(
5353
"""
5454
super().__init__(ip, live_config_update, session)
5555

56-
# ATO is strictly local-only in this integration.
57-
# Populate the local flag so entities/coordinators can branch without
58-
# noisy jsonpath misses.
59-
self.data.setdefault("local", {})
60-
self.data["local"]["use_cloud_api"] = False
61-
6256
# Ensure /configuration exists as a config source.
6357
sources = cast(list[SourceEntry], self.data.get("sources", []))
6458
sources.insert(

custom_components/redsea/switch.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,6 @@ class SaveStateSwitchEntityDescription(SwitchEntityDescription):
207207
icon="mdi:cloud-check-variant",
208208
icon_off="mdi:cloud-cancel",
209209
entity_category=EntityCategory.CONFIG,
210-
# ATO is local-only (no cloud API toggle).
211-
exists_fn=lambda device: not isinstance(device, ReefATOCoordinator),
212210
),
213211
)
214212

0 commit comments

Comments
 (0)