Skip to content

Commit

Permalink
feat: add reset emergency button
Browse files Browse the repository at this point in the history
requires v1.0.1-edge.1
  • Loading branch information
vermut committed Jul 20, 2024
1 parent 82f6c5c commit 07f2c0e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions custom_components/openmower/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async def async_setup_entry(
[
OpenMowerSkipAreaButton("Skip Area", prefix, "DUMMY", None),
OpenMowerSkipPathButton("Skip Path", prefix, "DUMMY", None),
OpenMowerResetEmergencyButton("Reset Emergency", prefix, "DUMMY", None),
]
)

Expand Down Expand Up @@ -63,3 +64,14 @@ async def async_press(self) -> None:
self._mqtt_topic_prefix + "action",
"mower_logic:mowing/skip_path",
)


class OpenMowerResetEmergencyButton(OpenMowerMqttButtonEntity):
_attr_icon = "mdi:alert-remove-outline"

async def async_press(self) -> None:
await mqtt.async_publish(
self.hass,
self._mqtt_topic_prefix + "action",
"mower_logic/reset_emergency",
)

0 comments on commit 07f2c0e

Please sign in to comment.