Presence Detecting and Groups

Recently my linksys_smart presence detection stopped working (post here). So I changed to NMAP which is causing false readers as the battery devices sleep. So I have added OwnTracks and want to use both to determine is someone is home for automation.

I followed the same idea as Phil Hathorne posted on his site using Groups. After updating my Automations and Groups files I get a laundry list of errors. Hence I believe it’s something simple. Below is the code.

group:
  craig:
    name: Craig
    entities:
      - device_tracker.craig
      - device_tracker.craig_s9
- alias: Craig Home
  trigger:
    - platform: group
      entity_id: group.craig
      from: 'not_home'
      to: 'home'
  condition:
    condition: or
    conditions:
      - condition: sun
        after: sunset
        after_offset: "-00:45:00"
      - condition: sun
        before: sunrise
  action:
  - service: switch.turn_on
    entity_id:
      - switch.honeywell_unknown_type_4952_id_3036_switch
      - switch.0220036060019472dce9
      - switch.0220036060019472da94

I sincerely appreciate any help.

Trigger platform should be state.

Thank you so much. I changed the Trigger Platform and added everything back in but received the same errors. I only get these errors when adding this particular home automation and group (I do not have any other groups set-up)

Unable to set up dependencies of default_config. Setup failed for dependencies: automation, script

What does the error in the log say?

Here is the log:

2019-12-11 18:24:58 ERROR (MainThread) [homeassistant.config] Invalid config for [group]: [craig] is an invalid option for [group]. Check: group->group->group->craig. (See /config/configuration.yaml, line 115). Please check the docs at https://home-assistant.io/integrations/group/
2019-12-11 18:24:58 ERROR (MainThread) [homeassistant.setup] Setup failed for group: Invalid config.
2019-12-11 18:24:59 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of device_tracker. Setup failed for dependencies: group
2019-12-11 18:24:59 ERROR (MainThread) [homeassistant.setup] Setup failed for device_tracker: Could not set up all dependencies.
2019-12-11 18:24:59 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of script. Setup failed for dependencies: group
2019-12-11 18:24:59 ERROR (MainThread) [homeassistant.setup] Setup failed for script: Could not set up all dependencies.
2019-12-11 18:25:00 WARNING (SyncWorker_4) [urllib3.connection] Certificate did not match expected hostname: 192.168.1.190. Certificate: {'subject': ((('commonName', '*.a65f8b6d3f0a452d832a0fb6f5a8eead.plex.direct'),),), 'subjectAltName': [('DNS', '*.a65f8b6d3f0a452d832a0fb6f5a8eead.plex.direct')]}
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of automation. Setup failed for dependencies: group
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Setup failed for automation: Could not set up all dependencies.
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.components.plex] Plex server could not be reached: https://192.168.1.190:32400
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of fan. Setup failed for dependencies: group
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Setup failed for fan: Could not set up all dependencies.
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of lock. Setup failed for dependencies: group
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Setup failed for lock: Could not set up all dependencies.
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of light. Setup failed for dependencies: group
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Setup failed for light: Could not set up all dependencies.
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of cover. Setup failed for dependencies: group
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Setup failed for cover: Could not set up all dependencies.
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of switch. Setup failed for dependencies: group
2019-12-11 18:25:00 ERROR (MainThread) [homeassistant.setup] Setup failed for switch: Could not set up all dependencies.
2019-12-11 18:25:01 ERROR (SyncWorker_2) [homeassistant.components.webostv.media_player] No TV found in configuration file or with discovery
2019-12-11 18:25:01 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of default_config. Setup failed for dependencies: automation, script
2019-12-11 18:25:01 ERROR (MainThread) [homeassistant.setup] Setup failed for default_config: Could not set up all dependencies.

Problem appears to be with your groups - aside from the code in your first post, what other references do you have to groups in your configuration?

Only the following:

group: !include groups.yaml

Wouldn’t the person integration be better for this?

In that case, remove the group: key from the top of your groups.yaml and move everything else back two spaces.

Then restart and post any errors.

download

That solved my issue. Thank you so much for all you help!

1 Like

Thank you so much for posting this suggestion. I set-up Person in the UI, but do I need to add the information to my config.yaml?

If you were able to setup the person via the GUI then you’re good to go and start using that person entity in your automations.

1 Like