Discovery service runs repeatedly

Hi,

I am new to Home Assistant and have a problem with the discovery service that runs every minute even though I’ve commented it out in configuration.yaml.

My setup is 0.58.0 on docker and it works so far as automations are concerned, it turns lights on and off. When I try to enter the container with docker attach homeassistant I am dropped to an empty line where no commands work.

Then I receive this result from the discover service every minute

2017-11-26 21:53:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2017-11-27T06:25:49+00:00, next_dusk=2017-11-27T15:15:57+00:00, next_midnight=2017-11-26T22:51:03+00:00, next_noon=2017-11-27T10:50:53+00:00, next_rising=2017-11-27T07:13:38+00:00, next_setting=2017-11-27T14:28:08+00:00, elevation=-47.59, azimuth=316.84, friendly_name=Sun @ 2017-11-26T21:44:01.593822+01:00>, new_state=<state sun.sun=below_horizon; next_dawn=2017-11-27T06:25:49+00:00, next_dusk=2017-11-27T15:15:57+00:00, next_midnight=2017-11-26T22:51:03+00:00, next_noon=2017-11-27T10:50:53+00:00, next_rising=2017-11-27T07:13:38+00:00, next_setting=2017-11-27T14:28:08+00:00, elevation=-47.69, azimuth=317.16, friendly_name=Sun @ 2017-11-26T21:44:01.593822+01:00>>
2017-11-26 21:54:09 INFO (MainThread) [homeassistant.components.http] Serving /api/states to 172.19.0.4 (auth: True)
2017-11-26 21:54:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2017-11-27T06:25:49+00:00, next_dusk=2017-11-27T15:15:57+00:00, next_midnight=2017-11-26T22:51:03+00:00, next_noon=2017-11-27T10:50:53+00:00, next_rising=2017-11-27T07:13:38+00:00, next_setting=2017-11-27T14:28:08+00:00, elevation=-47.69, azimuth=317.16, friendly_name=Sun @ 2017-11-26T21:44:01.593822+01:00>, new_state=<state sun.sun=below_horizon; next_dawn=2017-11-27T06:25:49+00:00, next_dusk=2017-11-27T15:15:57+00:00, next_midnight=2017-11-26T22:51:03+00:00, next_noon=2017-11-27T10:50:53+00:00, next_rising=2017-11-27T07:13:38+00:00, next_setting=2017-11-27T14:28:08+00:00, elevation=-47.78, azimuth=317.48, friendly_name=Sun @ 2017-11-26T21:44:01.593822+01:00>>

And so it goes on every minute

I changed log level to info but after restart I had nothing other than INFO posts in there.


Today I found out that the explanation to the problems I have had was that I entered the container with the wrong command. I should have used docker exec -it homeassistant bash for ending up in a normal shell. Sorry for not investigating better before asking for help.

I’m pretty sure those log entries have absolutely nothing to do with discovery: and everything to do with the sun: component. You can comment it out if you don’t want, but it is handy to have automations that trigger based on sun events (sunset, sunrise) or as conditions (only after sunset, etc).

Thanks for your reply marthocoo,

It’s good to know that it’s the sun: and not discovery: that causes these log entries.