Skip to content

Commit

Permalink
Updated to 2021.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
macbury committed Jun 17, 2021
1 parent 1dfae9f commit fa012eb
Show file tree
Hide file tree
Showing 23 changed files with 613 additions and 582 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: '3.5'
services:
home-assistant:
image: homeassistant/home-assistant:2021.1.5
image: homeassistant/home-assistant:2021.6.4
extra_hosts:
- "outside:${HOME_ASSISTANT_IP}"
env_file:
Expand Down
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
11 changes: 11 additions & 0 deletions home-assistant/components/climate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@
away_temp: 20
keep_alive:
minutes: 10

- platform: generic_hygrostat
name: Living Room
dryer: fan.living_room_humidifier
target_sensor: sensor.mean_living_room_humidity
min_humidity: 50
max_humidity: 80
target_humidity: 60
away_humidity: 50
away_fixed: True
sensor_stale_duration: 01:00:00
19 changes: 0 additions & 19 deletions home-assistant/components/generic_hygrostat.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions home-assistant/configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# A
api:
asuswrt: !include components/asuswrt.yaml
alexa: !include components/alexa.yaml
automation: !include_dir_merge_list automations/
# B
Expand All @@ -19,7 +18,6 @@ fan: !include components/fan.yaml
ffmpeg:
# G
group: !include groups.yaml
generic_hygrostat: !include components/generic_hygrostat.yaml
# H
homeassistant: !include components/homeassistant.yaml
http: !include components/http.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"error": {
"2fa_key_invalid": "Invalid Built-In 2FA key",
"connection_error": "Errore durante la connessione; controlla la rete e riprova",
"hass_url_invalid": "Impossibile collegarsi ad Home Assistant. Controllare l'URL interno nel menu Configurazione -> Generale",
"hass_url_invalid": "Impossibile collegarsi ad Home Assistant. Controllare l'URL esterno nel menu Configurazione -> Generale",
"identifier_exists": "L'Email per l'URL di Alexa è già stata registrata",
"invalid_credentials": "Credenziali non valide",
"unknown_error": "Errore sconosciuto, si prega di abilitare il debug avanzato e riportare i log informativi"
Expand Down
2 changes: 1 addition & 1 deletion home-assistant/custom_components/alexa_media/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ async def process_notifications(login_obj, raw_notifications=None):
previous = hass.data[DATA_ALEXAMEDIA]["accounts"][email].get(
"notifications", {}
)
notifications = {"process_timestamp": datetime.utcnow()}
notifications = {"process_timestamp": dt.utcnow()}
for notification in raw_notifications:
n_dev_id = notification.get("deviceSerialNumber")
if n_dev_id is None:
Expand Down
2 changes: 1 addition & 1 deletion home-assistant/custom_components/alexa_media/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""
from datetime import timedelta

__version__ = "3.10.5"
__version__ = "3.10.6"
PROJECT_URL = "https://github.com/custom-components/alexa_media_player/"
ISSUE_URL = f"{PROJECT_URL}issues"

Expand Down
4 changes: 2 additions & 2 deletions home-assistant/custom_components/alexa_media/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ async def _set_state(self, power_on, brightness=None, mired=None, hs=None):
self._requested_hs = None
else:
self._requested_hs = self.hs_color
self._requested_state_at = (
datetime.datetime.utcnow()
self._requested_state_at = datetime.datetime.now(
datetime.timezone.utc
) # must be set last so that previous getters work properly
self.async_write_ha_state()

Expand Down
2 changes: 1 addition & 1 deletion home-assistant/custom_components/alexa_media/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "alexa_media",
"name": "Alexa Media Player",
"version": "3.10.5",
"version": "3.10.6",
"config_flow": true,
"documentation": "https://github.com/custom-components/alexa_media_player/wiki",
"issue_tracker": "https://github.com/custom-components/alexa_media_player/issues",
Expand Down
12 changes: 4 additions & 8 deletions home-assistant/custom_components/alexa_media/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def _update_recurring_alarm(self, value):
while (
alarm_on
and recurring_pattern
and RECURRING_PATTERN_ISO_SET[recurring_pattern]
and RECURRING_PATTERN_ISO_SET.get(recurring_pattern)
and alarm.isoweekday not in RECURRING_PATTERN_ISO_SET[recurring_pattern]
and alarm < dt.now()
):
Expand Down Expand Up @@ -538,9 +538,7 @@ def device_state_attributes(self):

attr = {
"recurrence": self.recurrence,
"process_timestamp": dt.as_local(
datetime.datetime.fromtimestamp(self._timestamp.timestamp())
).isoformat(),
"process_timestamp": dt.as_local(self._timestamp).isoformat(),
"prior_value": self._process_state(self._prior_value),
"total_active": len(self._active),
"total_all": len(self._all),
Expand Down Expand Up @@ -586,10 +584,8 @@ def _process_state(self, value):
return (
dt.as_local(
super()._round_time(
datetime.datetime.fromtimestamp(
self._timestamp.timestamp()
+ value[self._sensor_property] / 1000
)
self._timestamp
+ datetime.timedelta(milliseconds=value[self._sensor_property])
)
).isoformat()
if value and self._timestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"error": {
"2fa_key_invalid": "Invalid Built-In 2FA key",
"connection_error": "Errore durante la connessione; controlla la rete e riprova",
"hass_url_invalid": "Impossibile collegarsi ad Home Assistant. Controllare l'URL interno nel menu Configurazione -> Generale",
"hass_url_invalid": "Impossibile collegarsi ad Home Assistant. Controllare l'URL esterno nel menu Configurazione -> Generale",
"identifier_exists": "L'Email per l'URL di Alexa è già stata registrata",
"invalid_credentials": "Credenziali non valide",
"unknown_error": "Errore sconosciuto, si prega di abilitare il debug avanzato e riportare i log informativi"
Expand Down
Empty file.
5 changes: 3 additions & 2 deletions home-assistant/custom_components/burze_dzis_net/manifest.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "Burze.dzis.net",
"documentation": "https://github.com/PiotrMachowski/Home-Assistant-custom-components-Burze.dzis.net",
"dependencies": [],
"codeowners": ["PiotrMachowski"],
"requirements": ["zeep"]
"codeowners": ["@PiotrMachowski"],
"requirements": ["zeep"],
"version": "v1.0.3"
}
76 changes: 0 additions & 76 deletions home-assistant/custom_components/generic_hygrostat/__init__.py
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
Loading

0 comments on commit fa012eb

Please sign in to comment.