diff --git a/appdaemon/settings/apps/scenes/alice_scenes.py b/appdaemon/settings/apps/scenes/alice_scenes.py index d18c53f..e655769 100644 --- a/appdaemon/settings/apps/scenes/alice_scenes.py +++ b/appdaemon/settings/apps/scenes/alice_scenes.py @@ -36,12 +36,12 @@ class AliceScenes(hass.Hass): self.turn_off_light() if (entity_name == "night_mode"): self.night_mode() - if (entity_name == "turn_on_coffeemachine"): - self.turn_on_coffeemachine() - if (entity_name == "turn_on_coffeemachine"): - self.turn_on_coffeemachine() - if (entity_name == "make_coffee"): - self.make_coffee() + if (entity_name == "away_mode"): + self.away_mode() + # if (entity_name == "turn_on_coffeemachine"): + # self.turn_on_coffeemachine() + # if (entity_name == "make_coffee"): + # self.make_coffee() def terminate(self): if self.listen_event_handle_list != None: @@ -56,6 +56,9 @@ class AliceScenes(hass.Hass): self.turn_off('group.all_lights') self.call_service("cover/close_cover", entity_id = 'cover.curtain_158d0002b0c46a') + def away_mode(self): + self.call_service("alarm_control_panel/alarm_arm_away", entity_id = self.args['ha_panel']) + def turn_on_coffeemachine(self): self.log('Turn on coffeemachine') self.call_service("mqtt/publish", topic = 'home/coffee/coffee/power/set', payload = 'on') diff --git a/appdaemon/settings/apps/scenes/alice_scenes.yaml b/appdaemon/settings/apps/scenes/alice_scenes.yaml index dc0e43f..c788934 100644 --- a/appdaemon/settings/apps/scenes/alice_scenes.yaml +++ b/appdaemon/settings/apps/scenes/alice_scenes.yaml @@ -2,5 +2,6 @@ alice_scenes: module: alice_scenes class: AliceScenes alice_prefix: input_boolean.alice_ + ha_panel: alarm_control_panel.ha_alarm global_dependencies: - globals \ No newline at end of file diff --git a/hass/settings/configuration/alice.yaml b/hass/settings/configuration/alice.yaml index 7849b68..c7b1971 100644 --- a/hass/settings/configuration/alice.yaml +++ b/hass/settings/configuration/alice.yaml @@ -10,8 +10,7 @@ filter: include_entities: - input_boolean.alice_night_mode - input_boolean.alice_turn_off_light - - input_boolean.alice_turn_on_coffeemachine - - input_boolean.alice_make_coffee + - input_boolean.alice_away_mode exclude_entities: - switch.plug_158d00020f3a29 @@ -21,10 +20,83 @@ filter: - switch.domofon_mode - switch.domofon_open - light.gateway_light_f0b429aa1463 - - # entity_config: - # input_boolean.alice_night_mode: - # room: SCENES - -# switch.kitchen: -# name: CUSTOM_NAME_FOR_YANDEX_SMART_HOME + +entity_config: + input_boolean.alice_away_mode: + name: "Я ушёл" + room: "Сценарии" + input_boolean.alice_night_mode: + name: "Спокойной ночи" + room: "Сценарии" + input_boolean.alice_turn_off_light: + name: "Выключи свет" + room: "Сценарии" + climate.living_room: + name: "Термостат" + room: "Гостиная" + light.yeelight_mono1_f0b429a8f6df: + name: "Люстра" + room: "Гостиная" + light.yeelight_color1_34ce008fe328: + name: "Люстра" + room: "Гостиная" + light.yeelight_color1_286c071065c7: + name: "Люстра" + room: "Гостиная" + light.yeelight_mono1_f0b4290e5444: + name: "Люстра" + room: "Гостиная" + light.yeelight_mono1_34ce0087ff33: + name: "Люстра" + room: "Гостиная" + switch.wifi_socket: + name: "Гирлянда" + room: "Гостиная" + fan.xiaomi_miio_device: + name: "Воздухоочиститель" + room: "Гостиная" + switch.plug_158d0001104a0c: + name: "Телевизор" + room: "Гостиная" + cover.curtain_158d0002b0c46a: + name: "Шторы" + room: "Гостиная" + light.bath: + name: "Люстра" + room: "Туалет" + light.philips_led: + name: "Люстра" + room: "Туалет" + light.kitchen_mini_light: + name: "Подсветка" + room: "Кухня" + light.kitchen: + name: "Люстра" + room: "Кухня" + switch.plug_158d0001a68c64: + name: "Посудомойка" + room: "Кухня" + switch.plug_158d0001a4cfb4: + name: "Стиралка" + room: "Кухня" + light.hall: + name: "Люстра" + room: "Коридор" + switch.plug_158d0001a68b18: + name: "Термопот" + room: "Кухня" + light.yeelight_mono1_f0b429a8d936: + name: "Люстра" + room: "Балкон" + light.yeelight_mono1_286c07f12bed: + name: "Люстра" + room: "Балкон" + switch.plug_158d0002924779: + name: "Фитолампа" + room: "Балкон" + vacuum.xiaomi_vacuum_cleaner: + name: "Пылесос" + room: "Дом" + switch.water_valve: + name: "Подача воды" + room: "Дом" \ No newline at end of file diff --git a/hass/settings/configuration/input/input_boolean/alice_automation.yaml b/hass/settings/configuration/input/input_boolean/alice_automation.yaml index caa319b..3476bdd 100644 --- a/hass/settings/configuration/input/input_boolean/alice_automation.yaml +++ b/hass/settings/configuration/input/input_boolean/alice_automation.yaml @@ -13,3 +13,7 @@ alice_turn_on_coffeemachine: alice_make_coffee: name: Сделай кофе initial: off + +alice_away_mode: + name: Я ушёл + initial: off \ No newline at end of file diff --git a/hass/settings/custom_components/yandex_smart_home b/hass/settings/custom_components/yandex_smart_home index faa54ae..37c2403 160000 --- a/hass/settings/custom_components/yandex_smart_home +++ b/hass/settings/custom_components/yandex_smart_home @@ -1 +1 @@ -Subproject commit faa54aed7fb3379483ef043e6c7bb89e444f5b2c +Subproject commit 37c2403a0a3159eeb31f0a0bf2bfa4f279cddba8