I want to add value of entity_id with attribute for type which is String.
Below are the details of code:
entities = [{'id': 'Room1',
'temperature': {'value': '10', 'type': 'String'},
'pressure': {'value': '12', 'type': 'Number'},
'type': 'Room',
'time_index': '2020-08-24T06:23:37.346348'},
{'id': 'Room2',
'temperature': {'value': '10', 'type': 'Number'},
'pressure': {'value': '12', 'type': 'Number'},
'type': 'Room',
'time_index': '2020-08-24T06:23:37.346664'},
{'id': 'Room3',
'temperature': {'value': '10', 'type': 'Number'},
'pressure': {'value': '12', 'type': 'Number'},
'type': 'Array',
'time_index': '2020-08-24T06:23:37.346664'}]
attr = ['temperature','pressure']
self.logger.warning(msg.format( attr, entity_id)
How can i add value of id where type is String with warning msg.format in above code..
New to python so any help on it will be great.Thanks
# TODO we should support type name different from NGSI types but mapping to NGSI types?