Thanks.
So I need some advices.
When I request my API, I get this result :
{
'elt_onde': [u'itemcomok', u'itemhidden', u'itemhidden', u'itemcomok', u'itemcomok', u'itemcomok', u'itemcomok', u'itemcomok', u'itemcomok', u'itemcomok'],
'elt_bat': [u'itembattok', u'itemhidden', u'itemhidden', u'itembattnok', u'itembattok', u'itembattok', u'itembattnok', u'itembattok', u'itembattok', u'itembattok'],
'item_label': [u'Trans', u'Badge', u'Teleco', u'Clavier', u'DO', u'DO', u'Sirene', u'DM', u'DM', u'DM'],
'item_pause': [u'running', u'running', u'running', u'running', u'running', u'running', u'running', u'running', u'running', u'running'],
'item_type': [u'typetrans', u'typebadgerfid', u'typeremote4', u'typekeyb', u'typedo', u'typedo', u'typesirenint', u'typedm', u'typedm', u'typedm'],
'elt_code': [u'0000', u'1111', u'2222', u'3333', u'4444', u'5555', u'6666', u'7777', u'8888', u'9999'],
'elt_as': [u'itemboxok', u'itemhidden', u'itemhidden', u'itemboxok', u'itemboxok', u'itemboxok', u'itemboxok', u'itemboxok', u'itemboxok', u'itemboxok'],
'elt_porte': [u'itemhidden', u'itemhidden', u'itemhidden', u'itemhidden', u'itemdoorok', u'itemdoorok', u'itemhidden', u'itemhidden', u'itemhidden', u'itemhidden']
}
It is all the state of all the devices. The particularity is that the key of this dict, is a binary state, and the element position on the list is the device.
The first column of each list is the same device, the 2nd one is another device.
So, for example, the device on the first column will get theses states :
- elt_onde : itemcomok
- elt_bat : itembatok
- item_label : Trans
etc. etc.
Based on that, what should I do ? Create a binary sensor for each item ? Create only one and works with attributes ?
I don’t really know from what perspective take this problem.