Skip to content

Add support for automation #3

@frodeheg

Description

@frodeheg

So we define the following:

  • Input_text = Whatever the user told homey to do
  • ChatGPT_wrapper = “Whatever text to wrap around the Input_text in order to produce the Output we need”
  • Output_actions = an array of instructions of the following form [Action 0, Action 1, …, Action n]
    • where Action is a json-structure {id: number, parameter1: text/number, parameter2: text/number, …, parameter n }
    • id is a number that have the following meanings:
  1. Create a “when” card that will trigger when the device with name=parameter1 changed temperature, the output of this when card will be the temperature itself which should be stored in a variable with the name stored in parameter2"
  2. Create an “and” card for logic comparison that compares the variable with name stored in parameter1 with the value stored in parameter2 using the compare-function stored in parameter3. A compare function must be a number which has the following meaning [0: not equal, 1: equal, 2: less than, 3: less than or equal, 4: greater than, 5: greater than or equal].
  3. Create a “then” card that will create a timeline notification with message = parameter1
  4. Create a “then” card that will turn on the device with id=parameter1
  5. Create a “then” card that will turn off the device with id=parameter1
  6. Create a “then” card that will change the temperature of the device with id=parameter1 to be parameter2 degrees celcius
  7. …fill in the list with other definitions of your liking…

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions