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

Makes amcrest.sensor to handle properly the scan_interval option. #6885

Merged
merged 3 commits into from Apr 3, 2017

Conversation

Projects
None yet
4 participants
@tchellomello
Copy link
Contributor

commented Apr 2, 2017

Description:

Makes amcrest.sensor to handle properly the scan_interval option.
This patch also adds a debug statement for troubleshooting purposes.

17-03-18 02:11:31 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [sensor.amcrest]: 
expected int for dictionary value @ data['scan_interval']. Got datetime.timedelta(0, 10). (See ?, line ?). 
Please check the docs at https://home-assistant.io/components/sensor.amcrest/

With this patch now is possible to assign a value to scan_interval as expected.

Related issue (if applicable):
Issue reported at: https://community.home-assistant.io/t/amcrest-sensor-scan-interval/13986/4

Example entry for configuration.yaml (if applicable):

sensor:
  - platform: amcrest
    host: !secret cam_ip 
    username: !secret cam_user
    password: !secret cam_pass
    scan_interval: 5
    monitored_conditions:
      - motion_detector

Checklist:

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

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass

I tested with different 1scan_interval values and worked as expected.

@balloobbot balloobbot added the platform label Apr 2, 2017

@balloob

This comment has been minimized.

Copy link
Member

commented Apr 3, 2017

Looks good! 🐬

@balloob balloob merged commit 5b8f185 into home-assistant:dev Apr 3, 2017

4 checks passed

cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 93.709%
Details
hound No violations found. Woof!

@tchellomello tchellomello deleted the tchellomello:amcrest_scan_interval branch Apr 3, 2017

@fabaff fabaff referenced this pull request Apr 6, 2017

Merged

0.42 #6956

@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017

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