I am helping a friend creating a binding for controlling panel heaters from Glen Dimplex. The heart of the binding is the connection to a Hub device which acts as a a bridge, with one or more things that can either be a Zone or Component, where a Zone is one of more Components, which can be a panel heater or a wall switch. The focus here will be on controlling the Zones.
The Hub device has a concept of Week Profiles for setting when during hour/day you want a Zone set to a given mode, like On, Off, Eco or Away. The week profiles are configured globally, meaning they can be assigned to zero or more zones.
The issue I am having is how to expose the week profiles to the user of the binding. Each week profile has an assigned number in the Hub Device, meaning the if we want to change week profile for a zone, we can send a message to the device with the new number. For this I have created a channel called activeWeekProfile, which always shows the active profile as a number.
To control it I have created a selection in a sitemap like this
Selection item=MainBedroom_Zone_WeekProfile mappings=[0="Default", 4="OFF", 7="On", 9="Eco", "12"="My Custom week profile with long name"]
But to do this I needed to extract the correct Week Profile ids and names from the Hub Device as a string type channel on the bridge device. This is a channel that lists out all the profiles as a long string in the format “id1=name1,id2=name2,…”. If the user has 3 or 4 profiles with short names this should not be a problem, but it you have a lot of week profiles the string is quickly overflowed in the sitemap. As sitemaps does not seem to have a textarea type or viewmode this quickly gets problematic for the user to view when creating their own sitemaps.
Having a map/list item type would have been a good way to solve this, but reading up on the forum made me understand this does not exist.
Does anyone have a suggestion on how to create a channel or present a map/list of week profiles to the user?