-
I want to move my existing Alexa skill A possible solution could be to implement a new template intent_script:
TurnOffInXIntent: # Intent type
speech:
text: Okay
action:
- delay: {{ parse_duration(duration_slot) }}
- service: light.turn_off
target:
entity_id: light.kitchen Given I implement and test it, is this something which would be accepted as a PR? Is there another way to solve this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Yeah seems fine. I wonder if we should name it |
Beta Was this translation helpful? Give feedback.
-
We have logic for that already that could be reused? The exact logic we use to validate time periods can be used for a template filter? |
Beta Was this translation helpful? Give feedback.
Yeah seems fine. I wonder if we should name it
parse_iso8601_duration
or something (not sure what we do for iso dates). Would the output be atimedelta
? Not sure if you needisodate
, it seems a bit overkill for 1 method? Can we cherry-pick it or is it already part of dateutil which we already install?