I found that reminder apps on my phone would only allow 1 geofence per reminder. this didnt work for me because I wanted to tag several locations and have a reminder go off at any one of those points without having multiple copies of it.
since home assistant allows me to give multiple zones the same name I desided to create a reminder app for it.
please keep in mind I have no experience coding so this might not spectacular but it works.
firstly you will need an app on your phone called TaskAgent. It is a simple reminder app that stores in plain text files and can sync them to a dropbox which you will also need as well as a way to sync it to your server.
then I made 2 lists called Store and Home.
next I created a file called reminders.py in the .homeassistant\custom_components\sensor directory
from homeassistant.helpers.entity import Entity
file1 = '/path_to_your_local/Dropbox/Apps/TaskAgent/Store.txt'
file2 = '/path_to_your_local/Dropbox/Apps/TaskAgent/Home.txt'
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the sensor platform."""
add_devices([storelist()])
add_devices([storeliston()])
add_devices([homelist()])
add_devices([homeliston()])
class storeliston(Entity):
"""Representation of a Sensor."""
@property
def name(self):
"""Return the name of the sensor."""
return 'store_liston'
@property
def state(self):
"""Return the state of the sensor."""
return None
class storelist(Entity):
"""Representation of a Sensor."""
@property
def name(self):
"""Return the name of the sensor."""
return 'store_list'
@property
def state(self):
"""Return the state of the sensor."""
f = open(file1)
file = f.read()
f.close()
if not file:
fstate = 'empty'
storeliston.state = 'off'
else:
fstate = file
storeliston.state = 'on'
return fstate
class homeliston(Entity):
"""Representation of a Sensor."""
@property
def name(self):
"""Return the name of the sensor."""
return 'home_liston'
@property
def state(self):
"""Return the state of the sensor."""
return None
class homelist(Entity):
"""Representation of a Sensor."""
@property
def name(self):
"""Return the name of the sensor."""
return 'home_list'
@property
def state(self):
"""Return the state of the sensor."""
f = open(file2)
file = f.read()
f.close()
if not file:
fstate = 'empty'
homeliston.state = 'off'
else:
fstate = file
homeliston.state = 'on'
return fstate
this creates 4 sensors
sensor.home_list
sensor.home_liston
sensor.store_list
sensor.store_liston
the first of each pair contains the list to use in notify if you want to send it to your phone
and the second is a binary state to use in automations so you only get notified while its populated.
I can now use these to trigger when crossing the zones home and store
I set up several zones called store so no matter which way I come home I will get a reminder
it still needs work but at lease its functional.