hass-core/homeassistant/components/geonetnz_quakes/const.py
Malte Franken 13bb2ea35a GeoNet NZ Quakes Sensor (#26078)
* working version of status sensor

* changed unit of measurement

* align naming with feed source

* simplified sensor name

* fix potential issue during initialisation

* fixed tests

* changed icon to constant

* added tests for new sensor

* split tests for geolocation vs sensor

* fixed lint

* fixed pylint

* fixed test

* removed config entry id from attributes

* moved entity manager to component

* fix issue with multiple config entries overriding each other's data

* creating async tasks instead of awaiting each unloading

* moved manager to component

* correctly triggering update only when this component is loaded

* fixed tests after major code refactorings

* fixed pylint

* moved actual creation of new events to geolocation platform

* changed all timestamps to utc

* changed the way platforms are setup and manager is updated

* simplify assert statement

* changed the way waiting for unloading platforms
2019-09-03 17:16:13 +02:00

23 lines
613 B
Python

"""Define constants for the GeoNet NZ Quakes integration."""
from datetime import timedelta
DOMAIN = "geonetnz_quakes"
PLATFORMS = ("sensor", "geo_location")
CONF_MINIMUM_MAGNITUDE = "minimum_magnitude"
CONF_MMI = "mmi"
FEED = "feed"
DEFAULT_FILTER_TIME_INTERVAL = timedelta(days=7)
DEFAULT_MINIMUM_MAGNITUDE = 0.0
DEFAULT_MMI = 3
DEFAULT_RADIUS = 50.0
DEFAULT_SCAN_INTERVAL = timedelta(minutes=5)
SIGNAL_DELETE_ENTITY = "geonetnz_quakes_delete_{}"
SIGNAL_UPDATE_ENTITY = "geonetnz_quakes_update_{}"
SIGNAL_STATUS = "geonetnz_quakes_status_{}"
SIGNAL_NEW_GEOLOCATION = "geonetnz_quakes_new_geolocation_{}"