Core: Service group.set not found

Created on 14 Dec 2018  ·  48Comments  ·  Source: home-assistant/core

Home Assistant release with the issue:
0.84.1

Last working Home Assistant release (if known):
0.83.1

Operating environment (Hass.io/Docker/Windows/etc.):
Hassbian, raspberry pi 3b+

Component/platform:
NA

Description of problem:
After upgrade from 0.83.1 I am constantly getting error and was not able to identify where the problem is...

2018-12-14 20:33:06 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):


Traceback (if applicable):


Additional information:
Attaching part of groups.yaml

  home_view:
    view: yes
#    icon: mdi:home
    name: Rooms
    entities:
      - device_tracker.katka__iphone
      - device_tracker.iphone_bt_rasto
      - group.garage_door_group
      - group.outside_group
      - group.kitchen
      - group.living_roon_group
      - group.kids_back_room_group
      - group.bathroom_group
      - group.hall_group

  device_tab:
    view: yes
    name: Devices
    entities:
      - group.smoke_sensor_group
      - group.water_sensor_group
      - group.battery_group
      - group.tamper_group
      - group.windows_door_sensor
      - group.temp_hum_group
      - group.others_group
      - group.media_group

  monitoring_tab:
    view: yes
    name: Monitoring
    entities:
      - group.nas
      - group.rpi
      - group.core
      - group.device_status_group
      - group.asus_group
      - group.gtw1_living_group
      - group.garage_node_group
      - group.ups_group
      - group.inet_speed_group

  settings_tab:
    view: yes
    name: Settings
    entities:
      - group.notifications
      - group.alert
      - group.state_reset

###################################
#                                 #
#              Groups             #
#                                 #
###################################

  state_reset:
    name: State Reset
    control: hidden
    entities:
      # - script.turn_off_living_room_low_bat_state
      # - script.turn_off_kids_room_low_bat_state
      # - script.turn_off_living_room_tamper_state
      # - script.turn_off_kids_room_tamper_state
      - script.state_reset_tamper_off
      - script.state_reset_smoke_off
      - script.state_reset_water
      # - script.test_reset_cmd_on
      - script.state_reset_battery

group stale

Most helpful comment

Have been seeing this for the past few releases....

All 48 comments

Seeing the same thing here on the same version.

2019-01-12 12:02:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-01-12 12:02:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-01-12 12:02:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-01-12 12:02:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-01-12 12:02:36 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1098, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

I thought it might be because I had recently removed all views from my groups as I moved to Lovelace a while ago, but replacing the groups.yaml with an earlier version with the views didn't change the error. Not sure if it makes a difference, but I have always used straight YAML for everything except customize and have never used the UI to create or configure groups.

Also this only seems to happen on startup; I went back to delete the earlier groups.yaml and replace it with the current one and did a reload of groups from Configuration > General > Configuration reloading
and then checked the logs. There were no new errors shown.

I'm on hass.io 0.84.6 but this error seemed to come quite a while after I updated. Still investigating; will update with any findings.

Have been seeing this for the past few releases....

Just checked my groups.yaml file for anything irregular. All the remaining groups are standard with just names and entity lists, no other options. YAML also validated just to be sure.

I only see this error on startup.

Still seeing this error as of 0.86.4. so keeping this issue alive and open. Saw a reference to it in the forums as well so it's not just us...

https://community.home-assistant.io/t/help-with-log-error-group-set-not-found/93235

Issue still present in 0.87.0 - Hass,io - Virtualbox

2019-02-09 18:31:34 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-02-09 18:31:34 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-02-09 18:31:34 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-02-09 18:31:34 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')
2019-02-09 18:31:34 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

Well, I have searched through every script, automation and custom component, etc. and found no use of the group.set service. The service itself seems to be available on the list of services but I can't find any reference to test if it actually works. I've even searched for hours through PRs to see if I could find anything and the closest suspect I could find was a change merged back in November 29, 2018. #18796

Coincidentally (perhaps?) this is when I first started seeing this error message. Could they be related in any way? I'm not a Python dev so I can't be sure but maybe someone who is could look into it? I've done all I could as an end user to provide as much info as I can but unless a more experienced dev takes an interest into this, I'm at the end of my ideas.

I am seeing this thing aswell, not on every startup, seems quite random.

I amnot using "group.set" anywhere in my configs

2019-02-17 14:23:18 ERROR (SyncWorker_0) [homeassistant.util.yaml] YAML file /home/ha/.homeassistant/packages/logger.yaml contains duplicate key "homeassistant.components.device_tracker". Check lines 14 and 17.
2019-02-17 14:23:34 WARNING (MainThread) [homeassistant.loader] You are using a custom component for sun which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-02-17 14:23:35 WARNING (MainThread) [homeassistant.loader] You are using a custom component for variable which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-02-17 14:23:35 WARNING (MainThread) [homeassistant.loader] You are using a custom component for custom_updater which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-02-17 14:29:24 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

I just debugged this for a few hours. Turns out that this is caused by having more than 1 group. At least from 0.87.x. I never had this issue prior. I disabled groups.yaml and the error went away. I enabled and the errors came back. I then reduced groups.yaml down to 1 single group. No error. I added a 2nd group and the errors came back. Not as many as when I had a full groups.yaml but 2 errors. I then removed the 1st group and left the 2nd group as to have just 1 group in the yaml again. But a different one. Restarted and no error. Added a 2nd group back in and error again. So it seems no matter what, having more than 2 groups will produce this error. Again, I only see this in 0.87.x.

2019-02-17 13:52:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/core.py", line 1107, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

This below produces the error

##
  Arrival Group Light:
    - light.chandelier_light
    - light.family_room_dimmer_light
    - light.kitchen_dimmer_front_light
    - light.master_lamp

  Arrival Group Switch:
    - switch.hallway_light

This below does not produce an error or vice versa. (Just as long as there are 2 groups)

##
  Arrival Group Light:
    - light.chandelier_light
    - light.family_room_dimmer_light
    - light.kitchen_dimmer_front_light
    - light.master_lamp

That's strange, because to me the error doesn't appear every single time.

True to be told, I have many groups and I don't actually need them at the moment (I was using them to visualize things in the old UI, but with Lovelace.. well.. pointless)

So basically now I simply removed them all :)

Let's see how it goes!

Thanks
Andrea

@SeLLeRoNe I currently use some groups as parts of automations. I think I will take some time to convert these and be done with groups. However it seems like groups are still a useful thing. But IDK how much longer they will be used/considered.

Oh yes of course they are useful!
I have no doubt of that, I was just saying that I was using them just for the UI for now (I am still on the study phase, nothing automated at home yet).

My point was just that I can get easily get rid of them to remove that error, surely in the future I might need them so it would still be a good thing to find and fix the problem :)

Nice find @edif30! I too still have some use for groups and it seems like there would be more people out there who still have groups active from the old pre Lovelace days so you'd think more people would be experiencing this error and it would get a little more traction. Hope a core dev sees the recent traffic on this issue and looks into it. Thanks for your efforts!

Issue still occurring in 0.88.1

Confirmed here on 0.88.1 too.

Error still exist in 0.89.0

Still on 0.90

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1115, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

I hope they aren't going to ignore groups in favor of the shiny new areas and persons features. ; )

All have their uses and many people still use groups. Seems like this thread laid out a good set of clues for the devs to follow. We know for sure that it occurs whenever more than one group is used.

Kind of sad to see this still exists SIX versions later. Just to confirm, still present in 0.90.1. Still happens if you have more than one entry in groups.yaml.

Just trying to keep this issue alive in hopes that it will finally be addressed. Things have a tendency to be closed if there's no traffic on it...

This seems to have been resolved in 0.91.x.

Not really, I do have it on 0.91.1:

2019-04-07 13:03:31 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1115, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

@SeLLeRoNe if you notice, the file path is different as well as what line number the exception is faulting on. I'd check to make sure your core.py is the most up to date.

Finally got to 0.91.1 and so far so good; like @edif30 I am no longer seeing this on reboots.

Hi @edif30 , thanks for spotting that, I guess the core.py is updated automatically once HA is updated, anyway I just updated to 0.91.2 and so far I didn't see it :)

Unfortunately today I saw it again

2019-04-15 11:57:23 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/ha/homeassistant/lib/python3.6/site-packages/homeassistant/core.py", line 1115, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

The path might differ just because of the installation "mode", I use the python Env one.
Regarding the line, I presume it is different because on each update they might add/remove lines, so on different version that line might be slightly different :)

Exists on 0.92.0

2019-04-26 16:03:30 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1115, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: (ServiceNotFound(...), 'Service group.set not found')

Saw it on 0.94.3

2019-06-16 13:51:21 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1127, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

Exists in 0.95.0 too

2019-06-27 14:11:55 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved                           
Traceback (most recent call last):                                                                                                        
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step                                                                          
    result = coro.send(None)                                                                                                              
  File "/home/hass/lib/python3.5/site-packages/homeassistant/core.py", line 1127, in async_call                                           
    raise ServiceNotFound(domain, service) from None                                                                                      
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

Also exists in 0.97.2, using latest python 3.7.3

2019-08-26 14:11:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/core.py", line 1210, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

Still exists on 0.99.2

Still exists on 0.99.3

Same here on 0.100.3

2019-10-27 11:29:28 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1208, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

aND... IT STILL exists in 101.1

2019-11-02 01:26:25 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1211, in async_call
raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

Hi
I have been able to track this down.
For me it was that one automation still was using states.[sensor_name] instead of states('sensor_name').

I thought that I had fixed this but maybe I accidently have introduced again after it was fixed.
More about this can be read in the documentation: https://www.home-assistant.io/docs/configuration/templating/

It clearly warns that this error will occur during startup if states, is_state, state_attr... methods are not used.
image

Please, search your whole code base and confirm that sensor.[sensor_name.state] is not beeing used.

A bit to quick there.
After a reboot the error is back even after changing above. :(

I was able to get rid of it again a couple of time by poking around in my automations.
However after 4h of error tracing I haven't been able to find any logic and now the error is persistent on every reboot regardless of what I change in the automations.

Sorry, if I got anyone's hopes up.

I still had this message in 0.102.0b1.

It disappeared converted my last states.[sensor_name] to states('sensor_name') as @MattiasPie suggested.

Today the message came back, got a bit nervous,
then i saw i accidently added code matching your states() advice in an extended way.
Again i could get rid of the messages by replacing the stale states.x syntax:

       value_template: >
         {% set e = strptime(
-             states.calendar.zaw_restmuelltonne.attributes.start_time,
+             state_attr('calendar.zaw_restmuelltonne','start_time'),
              '%Y-%m-%d %H:%M:%S') %}
         {{ e.strftime('%j')|int - now().strftime('%j')|int == 1 and now().hour >= 12 }}

Perhaps it helps someone.

Today the message came back, got a bit nervous,
then i saw i accidently added code matching your states() advice in an extended way.
Again i could get rid of the messages by replacing the stale states.x syntax:

       value_template: >
         {% set e = strptime(
-             states.calendar.zaw_restmuelltonne.attributes.start_time,
+             state_attr('calendar.zaw_restmuelltonne','start_time'),
              '%Y-%m-%d %H:%M:%S') %}
         {{ e.strftime('%j')|int - now().strftime('%j')|int == 1 and now().hour >= 12 }}

Perhaps it helps someone.

I have had the following error (11 times) on HA Startup in my log for quite some time now, and don't have any reference as you mentioned, can this error be caused by any other config?, I would really like to resolve this.

2019-11-27 01:24:57 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/core.py", line 1211, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service group/set

do you have your config posted anywhere?
perhaps I can find something….

i would dump the whole config in one file, sort it, and search for templates which appear or are exec'd 11 times.

No I don't sorry.

I've searched the entire project many times, does this mainly apply to templates?

afaik yes, have seen this only with templates so far.
i would catch this with the number of errors, you must have something appearing 11 times in your config.

I have started with:

cd /etc/homeassistant
grep -ir "value_template:" | grep "states\.“

The weird part is that it was 9 a few days ago, and I haven't added or changed anything since.

FYI, a project search via Atom returned 113 results all which seem to be formatted correctly.

What is grep -ir "value_template:" | grep "states\.“ supposed to do?

Search and list calls to the old states syntax as mentioned in https://github.com/home-assistant/home-assistant/issues/19303#issuecomment-550985102.
This fixed my problems.

Thanks, I did go through my config after seeing that post, weirdest thing, it showed up 9 times after a reboot last knight.

I went through my complete configuration and all automations, but I could not find any incorrect configurations as mentioned in https://github.com/home-assistant/home-assistant/issues/19303#issuecomment-550985102.
For me it seems that the error message must be caused by something else.

Hi
So this error recentley came back for me again.
I investigated this nasty little error for 5 hours yesterday and was able to track it the groups configuration.
I have spent another 2 hours commenting out line by line in the groups but not yet been able to pinpoint the problem.
However try to comment out all your groups and see if it makes any difference. At least you would know where to look if the error goes away.
I will continue investigate this and post any findings here.

So after another couple of hours I located the problem to be Trådfri E27's bulbs used in group.
When I declared these bulbs in a group the error came back.

I could however workaround it but using a light group as described here:
https://www.home-assistant.io/integrations/light.group/

Also another tip for those running on docker: to do a docker restart instead of a restart from the HASS GUI is a difference of 7X in speed. So for me this would have been solved much faster if I would have used the docker restart command instead of waiting for the GUI restart to be completed.

Try this approach in combination with the states() method describe above and see if it solves the issue!

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings