Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setPosition #455

Merged
merged 3 commits into from
May 31, 2021
Merged

Remove setPosition #455

merged 3 commits into from
May 31, 2021

Conversation

tetienne
Copy link
Collaborator

@tetienne tetienne commented May 31, 2021

When setPosition is available, there is always setClosure. For instance:

{
  "commands": [
    {
      "commandName": "advancedRefresh",
      "nparams": 1
    },
    {
      "commandName": "close",
      "nparams": 0
    },
    {
      "commandName": "delayedStopIdentify",
      "nparams": 1
    },
    {
      "commandName": "deploy",
      "nparams": 0
    },
    {
      "commandName": "down",
      "nparams": 0
    },
    {
      "commandName": "getName",
      "nparams": 0
    },
    {
      "commandName": "identify",
      "nparams": 0
    },
    {
      "commandName": "my",
      "nparams": 0
    },
    {
      "commandName": "open",
      "nparams": 0
    },
    {
      "commandName": "refreshMemorized1Position",
      "nparams": 0
    },
    {
      "commandName": "setClosure",
      "nparams": 1
    },
    {
      "commandName": "setDeployment",
      "nparams": 1
    },
    {
      "commandName": "setMemorized1Position",
      "nparams": 1
    },
    {
      "commandName": "setName",
      "nparams": 1
    },
    {
      "commandName": "setPosition",
      "nparams": 1
    },
    {
      "commandName": "setSecuredPosition",
      "nparams": 1
    },
    {
      "commandName": "startIdentify",
      "nparams": 0
    },
    {
      "commandName": "stop",
      "nparams": 0
    },
    {
      "commandName": "stopIdentify",
      "nparams": 0
    },
    {
      "commandName": "undeploy",
      "nparams": 0
    },
    {
      "commandName": "up",
      "nparams": 0
    },
    {
      "commandName": "wink",
      "nparams": 1
    },
    {
      "commandName": "runManufacturerSettingsCommand",
      "nparams": 2
    },
    {
      "commandName": "keepOneWayControllersAndDeleteNode",
      "nparams": 0
    },
    {
      "commandName": "pairOneWayController",
      "nparams": 2
    },
    {
      "commandName": "setConfigState",
      "nparams": 1
    },
    {
      "commandName": "unpairAllOneWayControllersAndDeleteNode",
      "nparams": 0
    },
    {
      "commandName": "unpairAllOneWayControllers",
      "nparams": 0
    },
    {
      "commandName": "unpairOneWayController",
      "nparams": 2
    }
  ],
  "states": [
    {
      "type": "ContinuousState",
      "qualifiedName": "core:ClosureState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "good",
        "low",
        "normal",
        "verylow"
      ],
      "qualifiedName": "core:DiscreteRSSILevelState"
    },
    {
      "type": "DataState",
      "qualifiedName": "core:ManufacturerSettingsState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:Memorized1PositionState"
    },
    {
      "type": "DataState",
      "qualifiedName": "core:NameState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "closed",
        "open"
      ],
      "qualifiedName": "core:OpenClosedState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:PriorityLockTimerState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:RSSILevelState"
    },
    {
      "type": "ContinuousState",
      "qualifiedName": "core:SecuredPositionState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "available",
        "unavailable"
      ],
      "qualifiedName": "core:StatusState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "comfortLevel1",
        "comfortLevel2",
        "comfortLevel3",
        "comfortLevel4",
        "environmentProtection",
        "humanProtection",
        "userLevel1",
        "userLevel2"
      ],
      "qualifiedName": "io:PriorityLockLevelState"
    },
    {
      "type": "DiscreteState",
      "values": [
        "LSC",
        "SAAC",
        "SFC",
        "UPS",
        "externalGateway",
        "localUser",
        "myself",
        "rain",
        "security",
        "temperature",
        "timer",
        "user",
        "wind"
      ],
      "qualifiedName": "io:PriorityLockOriginatorState"
    }
  ],
  "dataProperties": [
    {
      "value": "500",
      "qualifiedName": "core:identifyInterval"
    }
  ],
  "widgetName": "AwningValance",
  "uiProfiles": [
    "DeployableAwning",
    "Deployable",
    "DeployUndeploy",
    "StatefulCloseable",
    "StatefulOpenClose",
    "OpenClose"
  ],
  "uiClass": "Awning",
  "qualifiedName": "io:AwningValanceIOComponent",
  "type": "ACTUATOR"
}

Same remark for setPositionAndLinearSpeed and setClosureAndLinearSpeed:

{
	"commands": [{
		"commandName": "close",
		"nparams": 0
	}, {
		"commandName": "delayedStopIdentify",
		"nparams": 1
	}, {
		"commandName": "down",
		"nparams": 0
	}, {
		"commandName": "getName",
		"nparams": 0
	}, {
		"commandName": "identify",
		"nparams": 0
	}, {
		"commandName": "my",
		"nparams": 0
	}, {
		"commandName": "open",
		"nparams": 0
	}, {
		"commandName": "refreshMemorized1Position",
		"nparams": 0
	}, {
		"commandName": "setClosureAndLinearSpeed",
		"nparams": 2
	}, {
		"commandName": "setClosure",
		"nparams": 1
	}, {
		"commandName": "setDeployment",
		"nparams": 1
	}, {
		"commandName": "setMemorized1Position",
		"nparams": 1
	}, {
		"commandName": "setName",
		"nparams": 1
	}, {
		"commandName": "setPositionAndLinearSpeed",
		"nparams": 2
	}, {
		"commandName": "setPosition",
		"nparams": 1
	}, {
		"commandName": "setSecuredPosition",
		"nparams": 1
	}, {
		"commandName": "startIdentify",
		"nparams": 0
	}, {
		"commandName": "stop",
		"nparams": 0
	}, {
		"commandName": "stopIdentify",
		"nparams": 0
	}, {
		"commandName": "up",
		"nparams": 0
	}, {
		"commandName": "wink",
		"nparams": 1
	}, {
		"commandName": "pairOneWayController",
		"nparams": 2
	}, {
		"commandName": "unpairAllOneWayControllers",
		"nparams": 0
	}, {
		"commandName": "unpairOneWayController",
		"nparams": 2
	}],
	"states": [{
		"type": "ContinuousState",
		"qualifiedName": "core:ClosureState"
	}, {
		"values": ["good", "low", "normal", "verylow"],
		"type": "DiscreteState",
		"qualifiedName": "core:DiscreteRSSILevelState"
	}, {
		"type": "ContinuousState",
		"qualifiedName": "core:Memorized1PositionState"
	}, {
		"type": "DataState",
		"qualifiedName": "core:NameState"
	}, {
		"values": ["closed", "open"],
		"type": "DiscreteState",
		"qualifiedName": "core:OpenClosedState"
	}, {
		"type": "ContinuousState",
		"qualifiedName": "core:PriorityLockTimerState"
	}, {
		"type": "ContinuousState",
		"qualifiedName": "core:RSSILevelState"
	}, {
		"type": "ContinuousState",
		"qualifiedName": "core:SecuredPositionState"
	}, {
		"values": ["available", "unavailable"],
		"type": "DiscreteState",
		"qualifiedName": "core:StatusState"
	}, {
		"values": ["comfortLevel1", "comfortLevel2", "comfortLevel3", "comfortLevel4", "environmentProtection", "humanProtection", "userLevel1", "userLevel2"],
		"type": "DiscreteState",
		"qualifiedName": "io:PriorityLockLevelState"
	}, {
		"values": ["LSC", "SAAC", "SFC", "UPS", "externalGateway", "localUser", "myself", "rain", "security", "temperature", "timer", "user", "wind"],
		"type": "DiscreteState",
		"qualifiedName": "io:PriorityLockOriginatorState"
	}],
	"dataProperties": [{
		"value": "500",
		"qualifiedName": "core:identifyInterval"
	}],
	"widgetName": "PositionableRollerShutterWithLowSpeedManagement",
	"uiClass": "RollerShutter",
	"qualifiedName": "io:RollerShutterWithLowSpeedManagementIOComponent",
	"type": "ACTUATOR"
}

@github-actions github-actions bot added the enhancement New feature or request label May 31, 2021
@tetienne tetienne force-pushed the enhancement/cover/remove-setposition branch from fb48d20 to 04b138c Compare May 31, 2021 12:03
Copy link
Owner

@iMicknl iMicknl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that setClosure has the same behavior? Currently we use setPosition since this one is configured as the first option in the list. Perhaps this will solve our reversed state problems as well ;-).

@tetienne
Copy link
Collaborator Author

setClosure was the command suggested by Lou. And if you look at homebridge, jeedom, or other 3rd party lib they all use setClosure and not setPosition.

@tetienne tetienne merged commit 39f485e into master May 31, 2021
@tetienne tetienne deleted the enhancement/cover/remove-setposition branch May 31, 2021 15:27
iMicknl added a commit that referenced this pull request Jul 14, 2021
commit 4a77161
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 14:52:07 2021 -0700

    Adds basic support for AtlanticElectricalHeaterWithAdjustableTemperatureSetpoint (#362)

commit 93a02ff
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 14:30:49 2021 -0700

    Add support for AtlanticElectricalTowelDryer (#423)

    * Add scaffold for feature/AtlanticElectricalTowelDryer

    * Update presets and other features

    * First clean up

    * remove comments

commit a4709cd
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 14:18:00 2021 -0700

    Adjust Atlantic Electrical Heater to new standards and fix issues (#454)

    * Adjust Atlantic Electrical Heater to new standards and fix issues

    * Add comfort mode

    * Add missing extra comfort presets

commit 65de131
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 13:41:35 2021 -0700

    Add more information regarding Model and Manufacturer (#474)

commit 76d566c
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 11:56:06 2021 -0700

    Improve reauth, Config Flow and error handling (#452)

commit 847ee29
Author: Thibaut <thibaut@etienne.pw>
Date:   Wed Jul 14 19:09:43 2021 +0200

    Fix is_opening/closing for RTS devices (#464)

    Co-authored-by: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>

commit 560db42
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 10:01:12 2021 -0700

    Update pyhoma and require latest Home Assistant version (#473)

commit 242e21d
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 08:01:55 2021 -0700

    Currently stale issues are closed too soon (#470)

commit c467aa4
Author: Thibaut <thibaut@etienne.pw>
Date:   Tue Jun 29 17:13:52 2021 +0200

    Fix is_opening/is_closing for RTS covers (#463)

commit 60f0766
Author: Thibaut <thibaut@etienne.pw>
Date:   Mon Jun 21 09:17:18 2021 +0200

    Support is_opening/closing when moving position (#460)

commit 39f485e
Author: Thibaut <thibaut@etienne.pw>
Date:   Mon May 31 17:27:48 2021 +0200

    Remove setPosition (#455)
iMicknl added a commit that referenced this pull request Jul 14, 2021
commit 1bbacf1
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 15:14:39 2021 -0700

    Add basic support for AtlanticPassAPCHeatingAndCoolingZone (#380)

commit 4a77161
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 14:52:07 2021 -0700

    Adds basic support for AtlanticElectricalHeaterWithAdjustableTemperatureSetpoint (#362)

commit 93a02ff
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 14:30:49 2021 -0700

    Add support for AtlanticElectricalTowelDryer (#423)

    * Add scaffold for feature/AtlanticElectricalTowelDryer

    * Update presets and other features

    * First clean up

    * remove comments

commit a4709cd
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 14:18:00 2021 -0700

    Adjust Atlantic Electrical Heater to new standards and fix issues (#454)

    * Adjust Atlantic Electrical Heater to new standards and fix issues

    * Add comfort mode

    * Add missing extra comfort presets

commit 65de131
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 13:41:35 2021 -0700

    Add more information regarding Model and Manufacturer (#474)

commit 76d566c
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 11:56:06 2021 -0700

    Improve reauth, Config Flow and error handling (#452)

commit 847ee29
Author: Thibaut <thibaut@etienne.pw>
Date:   Wed Jul 14 19:09:43 2021 +0200

    Fix is_opening/closing for RTS devices (#464)

    Co-authored-by: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>

commit 560db42
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 10:01:12 2021 -0700

    Update pyhoma and require latest Home Assistant version (#473)

commit 242e21d
Author: Mick Vleeshouwer <Mick.Vleeshouwer@microsoft.com>
Date:   Wed Jul 14 08:01:55 2021 -0700

    Currently stale issues are closed too soon (#470)

commit c467aa4
Author: Thibaut <thibaut@etienne.pw>
Date:   Tue Jun 29 17:13:52 2021 +0200

    Fix is_opening/is_closing for RTS covers (#463)

commit 60f0766
Author: Thibaut <thibaut@etienne.pw>
Date:   Mon Jun 21 09:17:18 2021 +0200

    Support is_opening/closing when moving position (#460)

commit 39f485e
Author: Thibaut <thibaut@etienne.pw>
Date:   Mon May 31 17:27:48 2021 +0200

    Remove setPosition (#455)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants