Count people that are home

for what its worth,
ive debugged some of the automations, and found some listings that consisted of only one time, but still had the - in front of them.

changed that into this for example:

automation:
  - alias: 'Profile change'
    id: '1511601479005'
    hide_entity: True
    initial_state: 'on'
    trigger:
      platform: state
      entity_id: input_select.ha_mode
    condition: []
    action:
#      service: script.refresh
      service: python_script.summary

And working perfectly and instantaneous now. Will try the other automations with this approach and see what happens.

—edit-----

same goes for activity now, changed it like this:

# Sensor update
hass.states.set('sensor.activity_badge', state_value, {
    'friendly_name': ' ',
    'entity_picture': '/local/activities/{' '}.png'.format(state_value.replace(' ','').lower()),
    'unit_of_measurement': 'Act'
})


Cool!