Read data from MQTT topics directly from an automation or script without a sensor

The MQTT implementation is limited in the fact that you have to have a hard-coded MQTT sensor created before Home Assistant boots up that points to a specific topic. There are a lot of implementations, such as one I was working on now, where by topics are created dynamically, and I need to be able to access their data by either sending the topic through an API call or having it accessed based upon Alexa sending an intent variable with the AMAZON.DATE slot option, however, Home Assistant and Jinja2 templates have no way of accessing data from a topic that is not already known before hand by being assigned to a hard-coded sensor.

Basically, we need to be able to query the data on an MQTT topic directly from within an automation or script and not only by accessing the state of a hard coded sensor. I have 7 topics published weekly, one for each date of the current week, so there is a topic home/date/2016-09-14, and there is no way I can create an MQTT sensor to access a topic for every date from now until the end of time.

This would open up a LOT of possibilities for new and exciting automations :slight_smile: