irritanterik / homey-realtime-logpage

Realtime Homey Logger based on known socket.io namespaces
15 stars 8 forks source link

Changed tokens #12

Closed daneedk closed 5 years ago

daneedk commented 5 years ago

Hi Erik,

I've made some changes so tokens on the trigger cards get the same color as in the app according to their type and also a tooltip with some additional info such as the type and an example. The same layout is applied to these tokens in the action cards.

Hope you like it and will merge.

Groeten,

Danee

irritanterik commented 5 years ago

Where is the add folder button?

daneedk commented 5 years ago

I've removed it from the PR. I've started on the Add Folder function, the UI is done but I haven't yet figured out how to actually add it to Homey. I'm still looking into it and hope to get it working soon. In 1.5.13 it's added using an epoch and default name New Folder which you have to rename afterwards. I'm not sure what the best method would be for V2 and how to achieve that.

irritanterik commented 5 years ago

Based on https://developer.athom.com/docs/api/HomeyAPI.ManagerFlow.html#createFlowFolder I expect it to be something like:

    $.ajax({
      url: `${setup.protocol}://${setup.ip}/api/manager/flow/flowfolder/`,
      type: 'POST',
      data: {name: "newFoldername", order: 123, parent: "idofparentfolder"}
},
      success: function(data) { 
        console.log(data);
      }
    })