我敢肯定我们很多人都有同感!

不得不承认我从未使用过UI。我直接编辑YAML文件。开始使用UI界面很好,但我很快转向直接编辑YAML,包括lovelace文件。

哇,完全错过了这个小宝石!谢谢,@Burningstone

这里是代码,删除了一些个人信息…

—id: '1609617372924' alias:打开告警时克雷格离开描述:"触发器:-平台:分区entity_id:人。克雷格区域:区域。Home event: leave condition: [] action: - service: alarm_control_panel。Alarm_arm_home data: {} entity_id: alarm_control_panel。Home_alarm - service:通知服务。mobile_app_craigs_s20_mobile_app data: title: Notification message: Alarm is Now On mode: single - id: '1609618911422' alias: Turn off Alarm when Craig Arrives description: " trigger: - platform: zone entity_id: person. "克雷格区域:区域。Home事件:输入条件:[]action:—service: alarm_control_panel. action:Alarm_disarm data: {} entity_id: alarm_control_panel。Home_alarm - service:通知服务。mobile_app_craigs_s20_mobile_app数据:标题:通知消息:报警关闭模式:单- id:“1609619013116”别名:咖啡机在工作日6点描述:“触发:平台:时间:“6:00:00”条件:-条件:时间工作日:-星期一星期二-结婚-星期四星期五行动:-类型:turn_on device_id:ebfd43d57a492a3df2b06e2ca55b2a19 entity_id:开关。coffee_machine domain: switch mode: single - id:‘1609619243384’alias: Coffee Machine On Weekends 8 AM description:“trigger:—platform: time at:‘8:00:00’condition:—condition: time weekday:—sat—sun action:—type: turn_on device_id: ebfd43d57a492a3df2b06e2ca55b2a19 entity_id: switch. io”。coffee_machine domain: switch mode: single - id: '1609620474852' alias: Turn off Alarm Richelle arrived description: " trigger: - platform: zone entity_id: person. "richelle区域:区域。Home事件:输入条件:[]action:—service: alarm_control_panel. action:Alarm_disarm data: {} entity_id: alarm_control_panel。Home_alarm - service:灯。Turn_on数据:{}entity_id: light。Exterior_back_yard_lights -服务:灯。turn_on entity_id:光。exterior_front_door_lights mode: single - id: '1609653705623' alias: Alarm On Nightly 11:30 PM description: '' trigger: - platform: time at: '23:30:00' condition: [] action: - service: alarm_control_panel.alarm_arm_night data: {} entity_id: alarm_control_panel.home_alarm mode: single - id: '1609666069205' alias: Alarm Off 5 AM description: '' trigger: - platform: time at: '5:00:00' condition: [] action: - service: alarm_control_panel.alarm_disarm data: {} entity_id: alarm_control_panel.home_alarm mode: single - id: '1609724097915' alias: Brayden Lights off at 12:30 description: '' trigger: - platform: time at: 00:30:00 condition: - condition: time weekday: - mon - tue - wed - thu - sun action: - type: turn_off device_id: 9e071faf21145fcb246a611811a5be81 entity_id: light.braydens_light domain: light - service: notify.mobile_app_craigs_s20_mobile_app data: title: Notification message: Braydens Lights are OFF mode: single - id: '1609734649963' alias: Jord gets to Centennial Notification description: '' trigger: - platform: zone entity_id: person.jordyn zone: zone.centennial event: enter condition: [] action: - service: notify.mobile_app_craigs_s20_mobile_app data: title: Notification message: Jord has Arrived at Centennial mode: single alias: trigger: - platform: zone entity_id: - person.jordyn - person.brayden - person.richelle - person.craig zone: zone.home event: enter - platform: zone entity_id: - person.jordyn - person.brayden - person.richelle zone: zone.home event: leave - platform: zone entity_id: - person.jordyn - person.brayden - person.richelle zone: zone.centennial event: enter - platform: zone entity_id: - person.jordyn - person.brayden - person.richelle zone: zone.centennial event: leave action: - service: notify.family_devices data: message: > {% if trigger.event == "leave" %} {{ trigger.from_state.attributes.friendly_name }} left {{ trigger.zone.attributes.friendly_name }} {% else %} {{ trigger.from_state.attributes.friendly_name }} entered {{ trigger.zone.attributes.friendly_name }} {% endif %}

在上次的自动化中,您在别名前面缺少了一个破折号。

1像

添加一个破折号,然后给它一个名字,没有错误和配置通过检查,将看到发生什么当我的孩子离开学校…谢谢伙计们!

1像

嘿,伙计们,我收到了一些通知,我要继续测试……关于语法的一个小问题。我试图增加另一个区域,但这是工作,richelle,它不喜欢那样。应该将区域重命名为单个单词吗?

如果是"工作,richelle "那就没用了。只要让它“工作_richelle”

它们必须是一个连续的名称-使用下划线,而不是连字符。

很高兴它开始正常工作了!

好的谢谢兄弟。我把它们做成这样,所以应用程序上的按钮如果我看我妻子的状态,显示的是工作,但在地图上我们可以区分我的工作和我妻子的工作。肯尼迪再次表示感谢。

没问题!事实上,我收集了一些关于如何更好地使用跟踪的想法。我已经很长一段时间没有摆弄自动化的那部分了,它已经过时了。你给了我一些如何提高自己的想法!

1像

很高兴听到你这么说。

昨天和今天我都试过了……我添加的任何东西都不起作用,可能是一些语法。在大多数情况下,它是有效的。有一件事很奇怪,我在看app的时候,我的父母开车送孩子们去学校……他们都同时转向了学校区域,但我只收到了其中一个的通知。还得继续做一些测试。

如果你能张贴什么不起作用,我们可以试着找出问题-眼睛越多越好!

这可能是因为自动化已经在运行了——一个相对较新的自动化特性(也是一个非常受欢迎的特性)是模式选项-它可以用来防止这种情况。只需将以下内容添加到行动:行(缩进完全相同):

模式:排队

然后,半秒后试图触发自动化的程序将在第一个程序完成后排队运行(以下是该程序的文档:自动化模式- Home Assista19463331伟德国际nt (Home Assistant .io).请注意,是默认的。假设日志中有一个错误,说明自动化“已经在运行”。

谢谢KSC,你是一个摇滚明星,我会看看今天会发生什么,以确保我收到关于我儿子的通知和转发,希望这能帮助到未来的人,周五快乐!

哈哈——我不确定我妻子是否同意,因为她连灯都开不了: upside_down_face:

先生,也祝你星期五快乐!!

1像

嘿,科比,你能不能确认一下之前作用线吗?我查看了automations文件,我的一些automations有mode: single作为automations的最后一行。想要第一次就做好,这样我就可以用从学校来的孩子来触发,哈哈…

这是我现在有…奇怪的是我没有注意到id:在最后一行,不确定是否HA添加。这是我妻子上班时我没有收到通知的配置。你所做的一切都很好,哈哈。

—alias:分区通知触发器:—platform:分区entity_id:—person。jordyn——人。brayden——人。richelle——人。克雷格区域:区域。Home event: enter - platform: zone entity_id: - person。jordyn——人。brayden——人。richelle——人。克雷格区域:区域。Home事件:leave - platform: zone entity_id: - person。jordyn——人。brayden区域:区域。百年事件:enter - platform: zone entity_id: - person。jordyn——人。brayden区域:区域。centennial event: leave - platform: zone entity_id: - person.richelle zone: zone.richelles_work event: enter - platform: zone entity_id: - person.richelle zone: zone.richelles_work event: leave mode: queued action: - service: notify.family_devices data: message: "{% if trigger.event == \"leave\" %}\n {{ trigger.from_state.attributes.friendly_name\ \ }} left {{ trigger.zone.attributes.friendly_name }}\n{% else %}\n {{ trigger.from_state.attributes.friendly_name\ \ }} arrived {{ trigger.zone.attributes.friendly_name }}\n{% endif %}\n" id: ceb4d7d59a904f2bacd48a31fd646442

它几乎可以去任何地方,只要它与操作、别名和条件语句(不是可能在操作语句中的条件语句)处于相同的缩进级别。显然,UI自动化编辑器把它放在了末尾。希望它工作顺利!

UI编辑器需要具有唯一但似乎是随机数字的id来工作。如果只是编辑yaml文件,则不需要这些。如果你曾经使用过UI编辑器,HA会添加它。我想我已经删除了大部分行,因为我现在直接在yaml文件中进行编辑。早期版本的UI编辑器功能并不丰富,但人们现在真的提高了它的功能,所以它有了更多的功能。如果你确实删除了这些行,那么你就不能在UI编辑器中编辑自动化,这对我来说没什么大不了的——我倾向于使用很多模板……

嘿,这很有趣!眨眼:

1像

谢谢Kirby,我会继续更新的,再次感谢!!让我头疼,你们太聪明了,哈哈…

完美的工作,谢谢。当我们一起上车离开时,我收到4条通知,间隔几秒钟。谢谢。