Created
April 28, 2024 19:25
-
-
Save vermut/b4f66d254f27b49380e876dc1645f922 to your computer and use it in GitHub Desktop.
OpenMower HASS Integration (MQTT LawnMower way)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mqtt: | |
- lawn_mower: | |
- name: "OpenMower" | |
activity_state_topic: "openmower/robot_state/json" | |
activity_value_template: >- | |
{% set current_state = value_json.current_state %} | |
{% if current_state in ["MOWING", "DOCKING", "UNDOCKING"] %} | |
mowing | |
{% elif current_state in ["IDLE"] %} | |
{{ "docked" if bool(value_json.is_charging) else "paused" }} | |
{% else %} | |
none | |
{% endif %} | |
start_mowing_command_topic: "openmower/action" | |
start_mowing_command_template: "mower_logic:idle/start_mowing" | |
dock_command_topic: "openmower/action" | |
dock_command_template: "mower_logic:mowing/abort_mowing" | |
pause_command_topic: "openmower/action" | |
pause_command_template: "mower_logic:mowing/pause" | |
json_attributes_topic: "openmower/robot_state/json" | |
device: | |
identifiers: openmower |
I'm just getting started with HA, but I think including the position as attribute might blow up the states recorder DB: home-assistant/core#111582 (comment)
I read some docs, it seems like that indeed all state_attr changes are logged to history
, but it gets pruned every 10 days (default setting). So no harm, especially if it's temporary
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm just getting started with HA, but I think including the position as attribute might blow up the states recorder DB: home-assistant/core#111582 (comment)