1
mirror of https://github.com/home-assistant/core synced 2024-08-28 03:36:46 +02:00
ha-core/homeassistant/components/roborock/const.py
Luke Lashley bee457ed6f
Add Image to Roborock to display maps (#102941)
* add image to roborock

* add vacuum position

* addressing MR comments

* remove room names as it isn't supported in base package

* 100% coverage

* remove unneeded map changes

* fix image logic

* optimize create_coordinator_maps

* only update time if map is valid

* Update test_image.py

* fix linting from merge conflict

* fix mypy complaints

* re-add vacuum to const

* fix hanging test

* Make map sleep a const

* adjust commenting to be less than 88 characters.

* bump map parser
2023-11-18 12:22:30 -08:00

32 lines
596 B
Python

"""Constants for Roborock."""
from vacuum_map_parser_base.config.drawable import Drawable
from homeassistant.const import Platform
DOMAIN = "roborock"
CONF_ENTRY_CODE = "code"
CONF_BASE_URL = "base_url"
CONF_USER_DATA = "user_data"
PLATFORMS = [
Platform.BUTTON,
Platform.BINARY_SENSOR,
Platform.IMAGE,
Platform.NUMBER,
Platform.SELECT,
Platform.SENSOR,
Platform.SWITCH,
Platform.TIME,
Platform.VACUUM,
]
IMAGE_DRAWABLES: list[Drawable] = [
Drawable.PATH,
Drawable.CHARGER,
Drawable.VACUUM_POSITION,
]
IMAGE_CACHE_INTERVAL = 90
MAP_SLEEP = 3