# ezlo_capabilities.yaml
#
# Copyright (C) 2020-2022 Kedron Holdings LLC, All Rights Reserved
# This file is part of Reactor.
#
# *** IMPORTANT ***
# This is a system file. DO NOT place overrides or make modifications here.
# You can add your own capabilities by adding a "capabilities" section to
# your own local_ezlo_devices.yaml file in your config directory.
---
version: 22266
revision: 1
format: 1
copyright: Copyright (C) 2020-2022 Kedron Holdings LLC, All Rights Reserved

capabilities:
  x_ezlo_housemode:
    attributes:
      mode_id:
        type: string
      mode:
        type: string
        values:
          - Home
          - Away
          - Night
          - Vacation
      #previous_mode_id:
      #  type: string
      #previous_mode:
      #  type: string
    actions:
      set:
        arguments:
          mode_id:
            type: string
      set_mode:
        arguments:
          mode_name:
            type: string
            values:
              - Home
              - Away
              - Night
              - Vacation
      cancel_set: {}

  x_ezlo_object:
    id:
      type: string

  x_ezlo_device:
    attributes:
      category:
        type: string
      subcategory:
        type: string
      room:
        type: string
      parent:
        type: string
      status:
        type: bool
      reachable:
        type: bool
      battery_powered:
        type: bool
      manufacturer:
        type: string
      model:
        type: string
      type_id:
        type: string
    actions:
      set_name:
        arguments:
          name:
            type: string
      set_room:
        arguments:
          room_id:
            type: string
      status_check: {}
      # force_remove: {}
      device_check: {}
      set_item_value:
        arguments:
          item_name:
            type: string
            sort: 1
          type:
            type: string
            sort: 2
            values: ["string", "int", "real", "bool", "json"]
          value:
            type: string
            sort: 3
  x_ezlo_room:
    attributes:
      # id:  # room ID is object ID (in x_ezlo_object)
      parent_room:
        type: string
    actions:
      set_name:
        arguments:
          name:
            type: string

  x_ezlo_scene: {}

  x_ezlo_item: {}

  x_ezlo_battery_state:
    deprecated: "Use battery_maintenance instead"
    attributes:
      charging:
        type: bool
      maintenance_required:
        type: bool

  x_ezlo_sys:
    actions:
      runlua:
        deprecated: "This function has been disabled by Ezlo firmware"
        arguments:
          lua:
            type: string
            bigtext: true
            uiclass: code
      restart:
        arguments: {}
      set_setting:
        arguments:
          name:
            type: string
          value:
            type: string
            bigtext: true
          type:
            type: string
            values: ["string", "bool", "int", "real", "json"]
