{"id":13299,"date":"2021-03-26T10:15:51","date_gmt":"2021-03-26T10:15:51","guid":{"rendered":"https:\/\/www.rjt.org.uk\/home\/?post_type=home_assistant_tip&#038;p=13299"},"modified":"2021-03-26T10:57:24","modified_gmt":"2021-03-26T10:57:24","slug":"kitchen-timer-announcement","status":"publish","type":"home_assistant_tip","link":"https:\/\/www.rjt.org.uk\/home\/archives\/home-assistant-tip\/kitchen-timer-announcement\/","title":{"rendered":"Kitchen Timer Announcement"},"content":{"rendered":"\n<p>One annoying thing with the Timers on Echo&#8217;s is that they only go off in the room they were set in.<\/p>\n\n\n\n<p>This is a problem when you have a cake in the oven for 2 hours and are not in the kitchen when the timer goes off.  The following script and automation will trigger other Echos to Announce the Kitchen timer is sounding.<\/p>\n\n\n\n<p>Based on <a href=\"https:\/\/community.home-assistant.io\/t\/alexa-media-player-timers-as-a-trigger\/140982\">https:\/\/community.home-assistant.io\/t\/alexa-media-player-timers-as-a-trigger\/140982<\/a><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Script<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">alexa_timer_announce:\n  alias: Kitchen Timer Announcement Loop\n  mode: restart\n  sequence:\n  - delay: '{{ duration }}'\n  - repeat:\n      while:\n      - condition: template\n        value_template: '{{ states(''sensor.flex_kitchen_next_timer'') not in [''None'',\n          ''unknown'', ''unavailable''] and as_timestamp(states(''sensor.flex_kitchen_next_timer''))\n          &lt; as_timestamp(now()) }}'\n      sequence:\n      - service: notify.alexa_media\n        data_template:\n          target:\n          - media_player.dot_living_room\n          - media_player.jane_s_sonos_beam          \n          data:\n            type: announce\n          message: The kitchen timer is going off\n      - delay:\n          seconds: 10<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Automation<\/h5>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">- alias: Kitchen Timer Announcement\n  mode: parallel\n  trigger:\n    platform: state\n    entity_id: sensor.flex_kitchen_next_timer\n  condition:\n    condition: template\n    value_template: '{{ trigger.to_state.state not in [''None'', ''unknown'', ''unavailable'']\n      and trigger.from_state.state != trigger.to_state.state }}'\n  action:\n  - service: script.alexa_timer_announce\n    data_template:\n      duration: '{{ (as_timestamp(trigger.to_state.state) - now().timestamp() + 5)\n        | timestamp_custom(''%H:%M:%S'', false) }}'<\/pre>\n","protected":false},"template":"","class_list":["post-13299","home_assistant_tip","type-home_assistant_tip","status-publish","hentry","comments-off"],"_links":{"self":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/home_assistant_tip\/13299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/home_assistant_tip"}],"about":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/types\/home_assistant_tip"}],"wp:attachment":[{"href":"https:\/\/www.rjt.org.uk\/home\/wp-json\/wp\/v2\/media?parent=13299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}