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

Please add option to call_action, - simple "in" #618

Closed
dmitriytim opened this issue May 28, 2022 · 2 comments
Closed

Please add option to call_action, - simple "in" #618

dmitriytim opened this issue May 28, 2022 · 2 comments

Comments

@dmitriytim
Copy link

I want to execute a command:

raw_command  action '{"did":"1027278185","siid":4,"aiid":1,"in":[{"piid":1,"value":18},{"piid":10,"value":"{\"selects\":[[1,1,0,3,1]]}"}]}'
Running command raw_command
{'did': '1027278185', 'siid': 4, 'aiid': 1, 'out': [], 'code': 0}

but the plugin replaces, cuts, comments.
could not suggest what could be wrong.
Might be worth adding the "in" option

/usr/share/hassio/homeassistant/automations.yam
->

- id: '1653679406832'
  alias: уборка кухни
  description: ''
  trigger:
  - platform: state
    entity_id: input_button.uborka_kukhni
  condition: []
  action:
  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.dreame_p2140p_c40d_robot_cleaner
      siid: 4
      aiid: 1
      params:
      - 18
      - '{"selects":[[1,1,0,3,1]]}'
  mode: single

tail -f home-assistant.log
->
2022-05-28 07:24:21 INFO (SyncWorker_2) [custom_components.xiaomi_miot.vacuum] Пылесос(dreame.vacuum.p2140p): Call miot action {'did': 'action-4-1', 'siid': 4, 'aiid': 1, 'in': [{'piid': 10, 'value': 18}]} failed: {'did': 'action-4-1', 'siid': 4, 'aiid': 1, 'out': [], 'code': -1}

@al-one
Copy link
Owner

al-one commented May 28, 2022

Call action with force_params:

  - service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.dreame_p2140p_c40d_robot_cleaner
      siid: 4
      aiid: 1
      params:
      - piid: 1
        value: 18
      - piid: 10
        value: '{"selects":[[1,1,0,3,1]]}'
      force_params: true

@dmitriytim
Copy link
Author

Thanks a lot.

@al-one al-one closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants