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 debug prints to sun #23598

Merged
merged 2 commits into from
May 7, 2019
Merged

Add debug prints to sun #23598

merged 2 commits into from
May 7, 2019

Conversation

emontnemery
Copy link
Contributor

Description:

Add debug prints to sun.
Intended to aid debugging of #11985 and similar issues

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.

@emontnemery emontnemery requested a review from a team as a code owner May 1, 2019 13:37
@ghost
Copy link

ghost commented May 1, 2019

Hey there @home-assistant/core, mind taking a look at this pull request as its been labeled with a integration (sun) 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.

@emontnemery emontnemery mentioned this pull request May 1, 2019
@@ -120,15 +120,20 @@ def point_in_time_listener(self, now):
"""Run when the state of the sun has changed."""
self.update_sun_position(now)
self.update_as_of(now)
self.async_schedule_update_ha_state()
self.async_write_ha_state()
state = self.hass.states.get('sun.sun')
Copy link
Member

Choose a reason for hiding this comment

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

Don't do this. Entities should not add a dependency on their own state in the state machine. All the info should be there locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, this was really lazy..
Will fix!

@balloob balloob merged commit 102beaa into home-assistant:dev May 7, 2019
@balloob balloob mentioned this pull request May 14, 2019
@emontnemery emontnemery deleted the sun_debug branch September 6, 2019 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants