Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store scenario patch #9

Open
GiPe66 opened this issue Mar 30, 2020 · 0 comments
Open

Store scenario patch #9

GiPe66 opened this issue Mar 30, 2020 · 0 comments

Comments

@GiPe66
Copy link

GiPe66 commented Mar 30, 2020

Hi William,

I have successfully made store scenario working. Please replace the commented out part of mqtt_client.py with the following block.

`
Sorry, code indentation does not work...

    elif ('set_scenario' in str(topic)):
        print('Incoming MQTT set_scenario request : ', topic, payload)
        get_id = (topic.split("/"))[2] #extract id from mqtt
        print(str(get_id), 'run scenario')
        if not self.tydom.connection.open:
            print('Websocket not opened, reconnect...')
            await self.tydom.connect()
            await self.tydom.put_scenarios(str(get_id))

        else:
            await self.tydom.put_scenarios(str(get_id))

`
Thanks for all. Jean-Paul.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant