delete_zone()
  • 1 Minute to read

delete_zone()


Article summary

delete_zone()

Permanently deletes a saved zone area.

Reference

Arguments

ArgumentsTypeDefault value
location_namestrThe requested location on the map.
map_namestrThe requested map. If map_name is empty the current map will assumed.

Return

True if the whole function finished with no errors and the zone was deleted.

Exceptions

  • RayaNavNotLocated
  • RayaNavZonesNotFound
  • RayaNavUnkownError

See the complete list of navigation exceptions.

Usage Example

Code:

...
class RayaApplication(RayaApplicationBase):

    async def setup(self):
        self.nav = await self.enable_controller('navigation')
        ...

    async def loop(self):
        ...
        zone_deleted = await self.nav.delete_zone(
                    location_name='kitchen', 
                    map_name='unity_apartment'
                )
        if zone_deleted:
            self.log.info('Zone deleted...')
        ...

See the nav_all_unity_apartment, nav_get_info to check some valid uses.


Was this article helpful?