hhaim / hass

home assistant and appdaemon scripts and configuration file
41 stars 16 forks source link

heat.app.py sends unwanted TrackerNotification #5

Closed iz3man closed 5 years ago

iz3man commented 5 years ago

I expect this part of heat.app.py (mandatorily used by wbirrigation) to cause unwanted ios deivce tracking notifications. Maybe you can confirm this and make it user on/off or tell me how to disable it at all.

class TrackerNotification(hass.Hass):

    def initialize(self):
      self.notify("start TrackerNotification")
      self.listen_state(self.do_tracer_change, 'device_tracker')

    def do_tracer_change (self,entity, attribute, old, new, kwargs):
        if old != new:
            entity = entity.split('.')[1]
            t=datetime.datetime.now().strftime("%H:%M:%S")
            notify_msg=" {3} tracker *{0}*  *{1}* to *{2}* ".format(entity,old,new,t)
            self.log(notify_msg);
            self.notify(notify_msg)

This leads to unwanted output like this (information not needed and unwanted for me personally):

IMG_1345

hhaim commented 5 years ago

It is a feature not a bug. Just comment this out.

hhaim commented 5 years ago

BTW if you are using WBI. You can keep only WBI part in the YAML This will disable all the apps (except wbi)

iz3man commented 5 years ago

I was expecting it to be a feature not a bug :) If you say disable, disable it here:

track_notification:
   module: heat_app
   class: TrackerNotification

in apps.yaml? Because the notification stuff is in heat.app.py and this is a mandatory module in wbi, if i understand it correctly.

hhaim commented 5 years ago

In the yaml file, no need to touch the python file. Each section is an instance of an apps. I would keep only the wbi section (wbi app)

hhaim commented 5 years ago

This is how you disable an app Again better to keep only apps that you need.

#simple_sw_power:
#  module: heat_app
#  class: SimpleSwitch
#  schedule:
#       - { mode: a, start: { t: "18:05:00", d: 6}, end: { t: "18:06:00", d: 6} }
#  switch:
#     switch: switch.power0
#     enable: input_boolean.simple_switch0