docbobo / home-assistant-miele

Home Assistant support for Miele@home connected appliances
37 stars 16 forks source link

Support for invoking device actions #6

Closed docbobo closed 5 years ago

docbobo commented 5 years ago

First of all, actions can be triggered via HA service calls. There two different ways:

Invoking miele.action with

{
    'entity_id': 'miele.coffeemachine',
    'body': { 'light': 2 }
}

Alternatively, you can invoke the action with the Miele device id:

{
    'device_id': '0001234667',
    'body': { 'light': 2 }
}

Based on that, binary_sensors that were exposing the status of a light have been turned into actual light devices that can now be toggled.

Tscherno commented 4 years ago

Is there a documentation available for the possible actions? Or is it simply that part of the Miele documentation?

oneOf -> processActionintegerexample: {'processAction':1}possible actions out of 1 START 2 STOP 3 PAUSE 4 START SUPERFREEZING 5 STOP SUPERFREEZING 6 START SUPERCOOLING 7 STOP SUPERCOOLING availability depends on device and device statuslightintegerexample: {'light':2}possible actions out of 1 Enable 2 Disable availability depends on device and device statusstartTime[example: {'startTime':[2,45]}modify the start time relative from current time e.g. start in 2 hours 45 minutes availability depends on device and device statusinteger]deviceNamestringexample: {'deviceName':'My Devicename'}set a personal devicenamepowerOnbooleanexample: {'powerOn':true}powerOn device from off state to on state availability depends on device and device statuspowerOffbooleanexample: {'powerOff':true}powerOff device from on state to off state availability depends on device and device status

https://www.miele.com/developer/swagger-ui/index.html