Home Assistant Unofficial Reference 2024.12.1
const.py
Go to the documentation of this file.
1 """Constants for the WeatherFlow integration."""
2 
3 import logging
4 
5 from homeassistant.config_entries import ConfigEntry
6 
7 DOMAIN = "weatherflow"
8 LOGGER = logging.getLogger(__package__)
9 
10 
11 def format_dispatch_call(config_entry: ConfigEntry) -> str:
12  """Construct a dispatch call from a ConfigEntry."""
13  return f"{config_entry.domain}_{config_entry.entry_id}_add"
14 
15 
16 ERROR_MSG_ADDRESS_IN_USE = "address_in_use"
17 ERROR_MSG_CANNOT_CONNECT = "cannot_connect"
18 ERROR_MSG_NO_DEVICE_FOUND = "no_device_found"
str format_dispatch_call(ConfigEntry config_entry)
Definition: const.py:11