Snippets, Hass Snippets & Multi-Turn Dialogue

Hi,

I have made a voice assistant that can engage in multi-turn dialogue using snippets. The conversation is about setting the lights.

I had previously made assistants using the hass component to manage the light but could not get it work with multi-turn dialogue. Now I can get multi-turn dialogue to work but not manage the light.

I have tried this for example:

# Find out which room to turn the lights on
if len(intentMessage.slots.room) > 0:
    room = intentMessage.slots.room.first().value
    result_sentence = "Turning on lights in {}".format(str(room))
else:
    result_sentence = 	"Turning on lights" 


# This secton is meant to be used in the Hass component?????

# Turn the light on
if room is not None:
  entity_id = 'light.{}'.format(str(room))
  service_data = { 'entity_id': entity_id }
  hass.services.call('light', 'turn_on', service_data, False)

# Continue with the conversation
result_sentence += ". what colour would you like the light"
current_session_id = intentMessage.session_id

hermes.publish_continue_session(current_session_id, result_sentence, ["LLUWE19:select_colour"])

Is it possible to control hass using python snippets and hermes?
What have I missed.

Thanks for you help