Skip to content

Add missing support for jewish_calendar.omer_count sensor#24958

Merged
MartinHjelmare merged 4 commits into
home-assistant:devfrom
arigilder:add_omer
Jul 9, 2019
Merged

Add missing support for jewish_calendar.omer_count sensor#24958
MartinHjelmare merged 4 commits into
home-assistant:devfrom
arigilder:add_omer

Conversation

@arigilder
Copy link
Copy Markdown
Contributor

Description:

One sensor that's documented and should be supported is missing from the actual implementation. This PR fixes that.

Related issue (if applicable): n/a

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

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.
  • I have followed the [development checklist][dev-checklist]

If the code does not interact with devices:

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

@ghost
Copy link
Copy Markdown

ghost commented Jul 5, 2019

Hey there @tsvi, mind taking a look at this pull request as its been labeled with a integration (jewish_calendar) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

Copy link
Copy Markdown
Contributor

@tsvi tsvi left a comment

Choose a reason for hiding this comment

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

Looking good, please update documentation as well.

@arigilder
Copy link
Copy Markdown
Contributor Author

Doc PR is home-assistant/home-assistant.io#9814.

@tsvi
Copy link
Copy Markdown
Contributor

tsvi commented Jul 9, 2019

Thanks

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

The tests for this platform should preferably be rewritten in a future PR. See below comment.

test_time = time_zone.localize(now)
self.hass.config.latitude = latitude
self.hass.config.longitude = longitude
sensor = JewishCalSensor(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The tests will be more robust if we set up the component and platform via setup_component or async_setup_component, let the platform add an entity, mock time passing to have an update then assert that the entity state is correct by getting it from the core state machine.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sounds like a great idea. Do you have an example for something of that type?

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare Jul 9, 2019

Choose a reason for hiding this comment

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

@MartinHjelmare MartinHjelmare merged commit f3e5425 into home-assistant:dev Jul 9, 2019
@lock lock Bot locked and limited conversation to collaborators Jul 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants