апгрейд
This commit is contained in:
@@ -5,7 +5,7 @@ light_button_main:
|
||||
module: lightbutton
|
||||
class: LightButton
|
||||
sensor: binary_sensor.switch_158d00013f81a9
|
||||
entities: light.yeelight_rgb_34ce008fe328,light.yeelight_rgb_286c071065c7,light.yeelight_white_34ce0087ff33,light.yeelight_white_f0b4290e5444,light.yeelight_white_f0b429a8f6df
|
||||
entities: light.yeelight_color1_34ce008fe328,light.yeelight_color1_286c071065c7,light.yeelight_mono1_34ce0087ff33,light.yeelight_mono1_f0b4290e5444,light.yeelight_mono1_f0b429a8f6df
|
||||
global_dependencies:
|
||||
- globals
|
||||
|
||||
@@ -43,4 +43,4 @@ light_button_balcony:
|
||||
entities: group.balcony_light
|
||||
control_input: input_boolean.balcony_light_control
|
||||
global_dependencies:
|
||||
- globals
|
||||
- globals
|
||||
|
||||
@@ -10,9 +10,9 @@ entities_action:
|
||||
- switch.plug_158d0001104a0c # телевизор
|
||||
- switch.plug_158d0001a68b18 # термопот
|
||||
return_entities:
|
||||
- light.yeelight_rgb_34ce008fe328
|
||||
- light.yeelight_color1_34ce008fe328
|
||||
- light.hall
|
||||
- switch.plug_158d0001104a0c # телевизор
|
||||
- switch.plug_158d0001a68b18 # термопот
|
||||
global_dependencies:
|
||||
- globals
|
||||
- globals
|
||||
|
||||
@@ -38,5 +38,13 @@ class Lock(hass.Hass):
|
||||
user_var = "user_{}".format(changed_by)
|
||||
if user_var in self.args:
|
||||
user = self.args[user_var]
|
||||
self.disarm()
|
||||
message = "Открыта дверь пользователем: {}.".format(user)
|
||||
self.notify(message, name = self.args['notify'])
|
||||
|
||||
def disarm(self):
|
||||
if "ha_panel" in self.args:
|
||||
state = self.get_state(self.args['ha_panel'])
|
||||
if (state == "armed_away"):
|
||||
self.call_service("alarm_control_panel/alarm_disarm", entity_id=self.args['ha_panel'])
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ lock:
|
||||
user_65538: Света (указ)
|
||||
user_65539: Мама (указ)
|
||||
user_65540: Саня
|
||||
ha_panel: alarm_control_panel.ha_alarm
|
||||
notify: telegram
|
||||
global_dependencies:
|
||||
- globals
|
||||
@@ -29,7 +29,7 @@ fitolamp_timer:
|
||||
module: entity_timer
|
||||
class: EntityTimer
|
||||
on_time: "00:00:00"
|
||||
off_time: "07:00:00"
|
||||
off_time: "03:00:00"
|
||||
entity: switch.plug_158d0002924779
|
||||
global_dependencies:
|
||||
- globals
|
||||
|
||||
Reference in New Issue
Block a user