Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate a unique event when map loading is finished loading and all services have restarted #32

Open
carefulcomputer opened this issue Mar 3, 2024 · 2 comments

Comments

@carefulcomputer
Copy link

currently after loading the map the state goes to idle, if there was an event like 'map_ready' or something which indicates that vacuum is now ready with new map, that will be allow automations to work when new map is ready. (e.g. start vacumming when new map is fully loaded and ready to go)
Alternate is to check the sequence of events to trigger the automation but that is not that easy.

@pkoehlers
Copy link
Owner

Which automation system are you using?

I'd say doing this in HomeAssistant is actually easier than implementing this in the maploader (e.g. when to switch from map_ready to idle?)

I am using this configuration, where I enable the map selection controls when sensor.vacuum_mapchange_status is ready:

---
# mqtt
state_topic: valetudo/dreame-model/$state
name: "vacuum_valetudo_status"
---
# mqtt
state_topic: valetudo/dreame-model/maploader/status
name: "vacuum_maploader_status"
---
# template
sensor:
  - name: vacuum_mapchange_status
    state: >
      {% if is_state('sensor.vacuum_valetudo_status', 'lost') or is_state('sensor.vacuum_valetudo_status', 'disconnected') %}
        problem: valetudo
      {% elif is_state('sensor.vacuum_maploader_status', 'offline') %}
        problem: maploader
      {% elif is_state('sensor.vacuum_maploader_status', 'idle') and is_state('sensor.vacuum_valetudo_status', 'ready') %}
        ready
      {% else %}
        map_change
      {% endif %}

@carefulcomputer
Copy link
Author

thank you for prompt response ! so basically when sensor.vacuum_mapchange_status is ready that means new map has been loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants