cybermaggedon / pyvera

Python Vera interaction
GNU General Public License v3.0
3 stars 4 forks source link

Help run scene #8

Closed givanildo closed 5 years ago

givanildo commented 5 years ago

First of all, I wanted to thank you for your amazing work !!! but ,... How can i do to run a specific scene ex.:

cooler = ve.get_scene("Cooler Water") .... cooler.run()

I tried several ways and i can't do it run Please I need some help

////////////////////////////////////////////////

scenes = ve.get_scenes() for i in scenes: if i.name == "Hot water": i.run() ////////"

cybermaggedon commented 5 years ago

Sorry for missing this!!! Yeh you have the answer in your post...

#!/usr/bin/env python3

import sys
import vera
ve = vera.connect("LOCAL.cfg")

scenes = ve.get_scenes()

for scene in scenes:
    if scene.name == "Heating water on":
        print("Invoke")
        scene.run()