1 """Slack platform for sensor component."""
3 from __future__
import annotations
5 from slack
import WebClient
10 SensorEntityDescription,
17 from .const
import ATTR_SNOOZE, DOMAIN, SLACK_DATA
18 from .entity
import SlackEntity
24 async_add_entities: AddEntitiesCallback,
26 """Set up the Slack select."""
30 hass.data[DOMAIN][entry.entry_id][SLACK_DATA],
32 key=
"do_not_disturb_until",
33 translation_key=
"do_not_disturb_until",
34 device_class=SensorDeviceClass.TIMESTAMP,
44 """Representation of a Slack sensor."""
49 """Get the latest status."""
50 if _time := (await self.
_client_client.dnd_info()).
get(ATTR_SNOOZE):
web.Response get(self, web.Request request, str config_key)
None async_setup_entry(HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)