PiotrMachowski / Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
MIT License
1.13k stars 122 forks source link

Current position/room sensor. #435

Closed maxi1134 closed 1 year ago

maxi1134 commented 1 year ago

Description

I think that a way to know in which room the robot currently is could be very useful for automations.

Solution

A sensor that provides the current location of the vacuum in terms of room or X/Y positions.

Alternatives

I thought about tracking the robot with a BLE beacon, but that seems like a lot of trouble when we already have the map with the coordinates in this component.

Context

No response

PiotrMachowski commented 1 year ago

It is already possible. Following code will enable appropriate attributes in Map Extractor camera entity.

attributes:
  - vacuum_room
  - vacuum_position
maxi1134 commented 1 year ago

Thanks!

maxi1134 commented 1 year ago

Is there a way to make the numbers match between Mi home and this integration?

My room per instance is 10 in Mi home but 25 in the camera attributes.

PiotrMachowski commented 1 year ago

Are numbers in Mi Home consecutive?