-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
613 additions
and
582 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
home-assistant/blueprints/script/homeassistant/confirmable_notification.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
blueprint: | ||
name: Confirmable Notification | ||
description: >- | ||
A script that sends an actionable notification with a confirmation before | ||
running the specified action. | ||
domain: script | ||
source_url: https://github.com/home-assistant/core/blob/master/homeassistant/components/script/blueprints/confirmable_notification.yaml | ||
input: | ||
notify_device: | ||
name: Device to notify | ||
description: Device needs to run the official Home Assistant app to receive notifications. | ||
selector: | ||
device: | ||
integration: mobile_app | ||
title: | ||
name: "Title" | ||
description: "The title of the button shown in the notification." | ||
default: "" | ||
selector: | ||
text: | ||
message: | ||
name: "Message" | ||
description: "The message body" | ||
selector: | ||
text: | ||
confirm_text: | ||
name: "Confirmation Text" | ||
description: "Text to show on the confirmation button" | ||
default: "Confirm" | ||
selector: | ||
text: | ||
confirm_action: | ||
name: "Confirmation Action" | ||
description: "Action to run when notification is confirmed" | ||
default: [] | ||
selector: | ||
action: | ||
dismiss_text: | ||
name: "Dismiss Text" | ||
description: "Text to show on the dismiss button" | ||
default: "Dismiss" | ||
selector: | ||
text: | ||
dismiss_action: | ||
name: "Dismiss Action" | ||
description: "Action to run when notification is dismissed" | ||
default: [] | ||
selector: | ||
action: | ||
|
||
mode: restart | ||
|
||
sequence: | ||
- alias: "Set up variables" | ||
variables: | ||
action_confirm: "{{ 'CONFIRM_' ~ context.id }}" | ||
action_dismiss: "{{ 'DISMISS_' ~ context.id }}" | ||
- alias: "Send notification" | ||
domain: mobile_app | ||
type: notify | ||
device_id: !input notify_device | ||
title: !input title | ||
message: !input message | ||
data: | ||
actions: | ||
- action: "{{ action_confirm }}" | ||
title: !input confirm_text | ||
- action: "{{ action_dismiss }}" | ||
title: !input dismiss_text | ||
- alias: "Awaiting response" | ||
wait_for_trigger: | ||
- platform: event | ||
event_type: mobile_app_notification_action | ||
event_data: | ||
action: "{{ action_confirm }}" | ||
- platform: event | ||
event_type: mobile_app_notification_action | ||
event_data: | ||
action: "{{ action_dismiss }}" | ||
- choose: | ||
- conditions: "{{ wait.trigger.event.data.action == action_confirm }}" | ||
sequence: !input confirm_action | ||
- conditions: "{{ wait.trigger.event.data.action == action_dismiss }}" | ||
sequence: !input dismiss_action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
home-assistant/custom_components/burze_dzis_net/binary_sensor.py
100755 → 100644
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 0 additions & 76 deletions
76
home-assistant/custom_components/generic_hygrostat/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1 @@ | ||
"""The generic_hygrostat component.""" | ||
|
||
import logging | ||
|
||
import voluptuous as vol | ||
|
||
from homeassistant.components.humidifier.const import ( | ||
DEVICE_CLASS_DEHUMIDIFIER, | ||
DEVICE_CLASS_HUMIDIFIER, | ||
) | ||
from homeassistant.const import CONF_NAME | ||
from homeassistant.helpers import config_validation as cv, discovery | ||
|
||
DOMAIN = "generic_hygrostat" | ||
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
CONF_HUMIDIFIER = "humidifier" | ||
CONF_SENSOR = "target_sensor" | ||
CONF_MIN_HUMIDITY = "min_humidity" | ||
CONF_MAX_HUMIDITY = "max_humidity" | ||
CONF_TARGET_HUMIDITY = "target_humidity" | ||
CONF_DEVICE_CLASS = "device_class" | ||
CONF_MIN_DUR = "min_cycle_duration" | ||
CONF_DRY_TOLERANCE = "dry_tolerance" | ||
CONF_WET_TOLERANCE = "wet_tolerance" | ||
CONF_KEEP_ALIVE = "keep_alive" | ||
CONF_INITIAL_STATE = "initial_state" | ||
CONF_AWAY_HUMIDITY = "away_humidity" | ||
CONF_AWAY_FIXED = "away_fixed" | ||
CONF_STALE_DURATION = "sensor_stale_duration" | ||
|
||
DEFAULT_TOLERANCE = 3 | ||
DEFAULT_NAME = "Generic Hygrostat" | ||
|
||
HYGROSTAT_SCHEMA = vol.Schema( | ||
{ | ||
vol.Required(CONF_HUMIDIFIER): cv.entity_id, | ||
vol.Required(CONF_SENSOR): cv.entity_id, | ||
vol.Optional(CONF_DEVICE_CLASS): vol.In( | ||
[DEVICE_CLASS_HUMIDIFIER, DEVICE_CLASS_DEHUMIDIFIER] | ||
), | ||
vol.Optional(CONF_MAX_HUMIDITY): vol.Coerce(int), | ||
vol.Optional(CONF_MIN_DUR): vol.All(cv.time_period, cv.positive_timedelta), | ||
vol.Optional(CONF_MIN_HUMIDITY): vol.Coerce(int), | ||
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, | ||
vol.Optional(CONF_DRY_TOLERANCE, default=DEFAULT_TOLERANCE): vol.Coerce(int), | ||
vol.Optional(CONF_WET_TOLERANCE, default=DEFAULT_TOLERANCE): vol.Coerce(int), | ||
vol.Optional(CONF_TARGET_HUMIDITY): vol.Coerce(int), | ||
vol.Optional(CONF_KEEP_ALIVE): vol.All(cv.time_period, cv.positive_timedelta), | ||
vol.Optional(CONF_INITIAL_STATE): cv.boolean, | ||
vol.Optional(CONF_AWAY_HUMIDITY): vol.Coerce(int), | ||
vol.Optional(CONF_AWAY_FIXED): cv.boolean, | ||
vol.Optional(CONF_STALE_DURATION): vol.All( | ||
cv.time_period, cv.positive_timedelta | ||
), | ||
} | ||
) | ||
|
||
CONFIG_SCHEMA = vol.Schema( | ||
{DOMAIN: vol.All(cv.ensure_list, [HYGROSTAT_SCHEMA])}, extra=vol.ALLOW_EXTRA, | ||
) | ||
|
||
|
||
async def async_setup(hass, config): | ||
"""Set up the Generic Hygrostat component.""" | ||
if DOMAIN not in config: | ||
return True | ||
|
||
for hygrostat_conf in config[DOMAIN]: | ||
hass.async_create_task( | ||
discovery.async_load_platform( | ||
hass, "humidifier", DOMAIN, hygrostat_conf, config | ||
) | ||
) | ||
|
||
return True |
Oops, something went wrong.