I think it might be easier to parse by doing it this way (tabbed for clarity, won't compile this way)
HA_ITEMS = [
                  ("Living Room",

                                (
                                        ("Corner Light", ("On","Off","Dim")),
                                        ("Ceiling Fan", ("On","Off")),
                                        ("TV",("On","Off","Dim"))
                                ),
                   ("Bedroom",
                                (
                                        ("Ceiling Lights",("On","Off","Dim"))
                                ),
                  ("Bedroom",

                                (
                                        ("Table Lamp",("On","Off","Dim"))
                                )
                   ]


Then you can just do 'for' loops.
eg,
for room in config.HA_ITEMS:
        for device in room:
                for control in device:






After looking at other plugins I think I will pull my config from
local_config.py like the rest do, somethin like:

HA_ITEMS = [
                  ("Living Room", "Corner Light","On,Off,Dim"),
                  ("Living Room", "Ceiling Fan","On,Off"),
                  ("Living Room", "TV","On,Off"),
                  ("Bedroom", "Ceiling Lights","On,Off,Dim")
                  ("Bedroom", "Table Lamp","On,Off,Dim")
                   ]




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to