adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

IO_HTTP: Support creating group data #97

Closed VictorioBerra closed 3 months ago

VictorioBerra commented 1 year ago

Hello,

Can we add support for this API? https://io.adafruit.com/api/docs/#create-group-data

Usage would be:

weather_payload = {
    'feeds': [ 
      { 'key': "temp-feed", 'value': 1 },
      { 'key': "humid-feed", 'value': 2 } 
    ] 
}

adafruit_io_http_client.send_data("s3-1-battery", weather_payload, is_group = True)

Right now, the samples only show using MQTT to publish to a group but they just call publish twice, the group key is not even used https://github.com/adafruit/Adafruit_CircuitPython_AdafruitIO/blob/main/examples/adafruit_io_mqtt/adafruit_io_groups.py#L108