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

Add zone and reps for Xiaomi vacuum #19777

Merged
merged 42 commits into from Feb 20, 2019

Conversation

@marcogazzola
Copy link
Contributor

commented Jan 4, 2019

Description:

Add functionality to clean a specific zone and set the number of repetitions with Xiaomi Vacuum

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#8047

Declare the data_template parameter for using templating repeats parameter.

Example entry for automation.yaml (if applicable):

automation:
#Inline array:
  - alias: Test vacuum zone3
    trigger:
    - event: start
      platform: homeassistant
    condition: []
    action:
    - service: vacuum.xiaomi_clean_zone
      data_template:
        entity_id: vacuum.xiaomi_vacuum
        repeats: '{{states.input_number.vacuum_passes.state|int}}'
        zone: [[30914,26007,35514,28807], [20232,22496,26032,26496]]

#Array with inline zone:
  - alias: Test vacuum zone3
    trigger:
    - event: start
      platform: homeassistant
    condition: []
    action:
    - service: vacuum.xiaomi_clean_zone
      data:
        entity_id: vacuum.xiaomi_vacuum
        repeats: 2
        zone: 
        - [30914,26007,35514,28807]
        - [20232,22496,26032,26496]

#Array mode:
  - alias: Test vacuum zone3
    trigger:
    - event: start
      platform: homeassistant
    condition: []
    action:
    - service: vacuum.xiaomi_clean_zone
      data:
        entity_id: vacuum.xiaomi_vacuum
        repeats: 1
        zone: 
        - - 30914
          - 26007
          - 35514
          - 28807
        - - 20232
          - 22496
          - 26032 
          - 26496

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@marcogazzola marcogazzola requested review from rytilahti and syssi as code owners Jan 4, 2019

@homeassistant

This comment has been minimized.

Copy link

commented Jan 4, 2019

Hi @marcogazzola,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@homeassistant

This comment has been minimized.

Copy link

commented Jan 4, 2019

Hi @marcogazzola,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@homeassistant homeassistant added cla-signed and removed cla-needed labels Jan 4, 2019

@rytilahti
Copy link
Contributor

left a comment

Just a very brief review, hopefully someone else will also chime in to review this.

Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/services.yaml Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/services.yaml Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved tests/components/vacuum/test_xiaomi_miio.py Outdated

@fabaff fabaff changed the title xiaomi vacuum with zone and reps Add zone and reps for Xiaomi vacuum Jan 10, 2019

@marcogazzola

This comment has been minimized.

Copy link
Contributor Author

commented Jan 15, 2019

Just a very brief review, hopefully someone else will also chime in to review this.
All the problems have been fixed. Please approve it.

@syssi

syssi approved these changes Jan 15, 2019

Copy link
Member

left a comment

LGTM. Please do me a favor and update the log messages. :-)

Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated
@MartinHjelmare
Copy link
Member

left a comment

Last comment, I think. Then we should be good after the merge conflict is solved.

Show resolved Hide resolved homeassistant/components/vacuum/xiaomi_miio.py Outdated

marcogazzola added some commits Jan 4, 2019

fix

@marcogazzola marcogazzola force-pushed the marcogazzola:dev branch from 48eea78 to 1f0e7b3 Feb 20, 2019

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Feb 20, 2019

The branch is polluted. Either try to fix it or open a new PR.

@marcogazzola

This comment has been minimized.

Copy link
Contributor Author

commented Feb 20, 2019

The branch is polluted. Either try to fix it or open a new PR.

I'm sorry..
I think I've resolve the problem and now the branch is ok.

Show resolved Hide resolved homeassistant/components/zha/sensor.py Outdated
Show resolved Hide resolved homeassistant/components/zha/sensor.py Outdated
Show resolved Hide resolved homeassistant/components/zha/sensor.py Outdated
Show resolved Hide resolved homeassistant/components/zha/sensor.py Outdated
Show resolved Hide resolved homeassistant/components/zha/sensor.py Outdated
Show resolved Hide resolved homeassistant/components/zha/switch.py Outdated
Show resolved Hide resolved homeassistant/components/zha/switch.py Outdated
Show resolved Hide resolved homeassistant/components/zha/switch.py Outdated
Show resolved Hide resolved homeassistant/components/zha/switch.py Outdated
Show resolved Hide resolved homeassistant/components/zha/switch.py Outdated

marcogazzola added some commits Feb 20, 2019

Revert "log fixed"
This reverts commit 1f0e7b3.

@rytilahti rytilahti merged commit 5115dfa into home-assistant:dev Feb 20, 2019

3 checks passed

Hound No violations found. Woof!
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@wafflebot wafflebot bot removed the in progress label Feb 20, 2019

@dshokouhi dshokouhi referenced this pull request Feb 20, 2019

Merged

Add custom and zone cleaning to Neato Vacuums #20779

4 of 9 tasks complete

thibmaek added a commit to thibmaek/home-assistant that referenced this pull request Feb 21, 2019

Merge remote-tracking branch 'upstream/dev' into feature/discogs-v2
* upstream/dev: (948 commits)
  Prevent partial custom component overlays (home-assistant#21070)
  Alarm trigger support for Point (home-assistant#21207)
  Upgrade opensensemap-api to 0.1.4 (home-assistant#21240)
  Remove constraint from regex (home-assistant#21239)
  Updated frontend to 20190220.0
  Support OpenWRT 18.06 in luci device tracker (home-assistant#21236)
  Bump zigpy (home-assistant#21203)
  Fix bug in ZHA and tweak non sensor channel logic (home-assistant#21234)
  Don't dispatch to components when there are no channels for ZHA sensors (home-assistant#21223)
  Add zone and reps for Xiaomi vacuum (home-assistant#19777)
  Fix an Ambient PWS exception when location info is missing (home-assistant#21220)
  Add self to integration sensor and utility_meter (home-assistant#21226)
  Prevent invalid context from crashing (home-assistant#21231)
  Update pyhomematic to 0.1.56 (home-assistant#21227)
  Fix the build (home-assistant#21229)
  Updated frontend to 20190219.0
  Add yeelight flow action support (home-assistant#21195)
  Refactor ZHA listeners into channels (home-assistant#21196)
  Fix Homematic IP Cloud configuration (home-assistant#21202)
  Push pyads to 3.0.7 (home-assistant#21216)
  ...

@balloob balloob referenced this pull request Mar 6, 2019

Merged

0.89.0 #21712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.