leeyuentuen / localtuya

local handling for Tuya devices
GNU General Public License v3.0
70 stars 17 forks source link

Unable to use set_position on LocalTuya Covers #66

Open mandishshah opened 1 year ago

mandishshah commented 1 year ago

The problem

I'd like to use the set_position functionality from HA for my covers. I have configured all my covers at the moment using YAML which didn't let me know set the min_value, max_value, or the step_size values during the initial configuration. However, the config flow did allow for this so I am not sure if this is the root issue or not. Are there any workarounds for me to set these and try debugging further.

Environment

Steps to reproduce

Developer Tools -> Services -> Cover: Set Position -> 50% -> Run into an error

Configuration configuration.yaml or config_flow

- parent_gateway: <> # This tells it is a sub-device dependent on a parent gateway
  device_id: <> # The cid of sub-device
  friendly_name: Dining Room Blind
  entities:
    - platform: cover
      friendly_name: Dining Room Blind
      id: 1
      commands_set: "open_close_stop"
    - platform: number
      friendly_name: Dining Room Blind Percent Control
      id: 2
    - platform: sensor
      friendly_name: Dining Room Blind Current Position
      id: 3
    - platform: sensor
      friendly_name: Dining Room Blind State
      id: 7

Some Logs

websocket_api script: Error executing script. Error for call_service at pos 1: Entity cover.dining_room_blind does not support this service.
[139624471009056] Error handling message: Entity cover.dining_room_blind does not support this service. (unknown_error)
hectorzin commented 9 months ago

I have the same problem, but I configured the cover using the UI. I selected the timed option, and every time I open or close the cover it says unable to call service cover/open_cover. 'set_position_dp'