Let me know if you need more than this.
Intent Schema
{
"intents": [
{
"slots": [
{
"name": "ASensor",
"type": "ASensors"
}
],
"intent": "allsensors"
},
{
"intent": "AMAZON.CancelIntent"
},
{
"intent": "AMAZON.HelpIntent"
},
{
"intent": "AMAZON.StopIntent"
},
{
"slots": [
{
"name": "Sensor",
"type": "Sensors"
}
],
"intent": "statussensor"
}
]
}
configuration.yaml
alexa:
intent_script:
statussensor:
speech:
type: plain
text: >
{%- for state in states -%}
{%- if state.name.lower() == Sensor.lower() -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name }} status is {{ state.state }} {{- state.attributes.unit_of_measurement}}
{%- endif -%}
{%- else -%}
Sorry, I can't find the status of {{ state.name }}
{%- endfor -%}
allsensors:
speech:
type: plain
text: >
{%- for state in states.switch -%}
{%- if state.state == ASensor.lower() -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name }} status is {{ state.state }} {{- state.attributes.unit_of_measurement}}
{%- endif -%}
{%- else -%}
Sorry, I can't find anything in state of {{ ASensor }}
{%- endfor -%}
{%- for state in states.binary_sensor -%}
{%- if state.state == ASensor.lower() -%}
{%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}
{{ state.name }} status is {{ state.state }} {{- state.attributes.unit_of_measurement}}
{%- endif -%}
{%- else -%}
Sorry, I can't find anything in state of {{ ASensor }}
{%- endfor -%}