Hi all!
I updated Appdaemon and after that most of my apps doesnt work:
Error log:
2019-12-27 21:55:33.643391 WARNING AppDaemon: Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/appdaemon/appdaemon.py", line 1581, in init_object
init()
File "/home/user/.homeassistant/conf/apps/PIRs/PIR_Living_Room.py", line 7, in initialize
self.listen_state(self.puck_living_room, "zigbee2mqtt/Kitchen PIR", new = "toggle")
File "/usr/local/lib/python3.6/dist-packages/appdaemon/plugins/mqtt/mqttapi.py", line 66, in listen_state
return super(Mqtt, self).listen_state(namespace, cb, entity, **kwargs)
TypeError: listen_state() takes from 2 to 3 positional arguments but 4 were given
One of the app (simplified):
import appdaemon.plugins.mqtt.mqttapi as mqtt
import appdaemon.plugins.hass.hassapi as hass
class PIR_Living_Room(mqtt.Mqtt, hass.Hass):
def initialize(self):
self.listen_state(self.pir_living_room, "zigbee2mqtt/Kitchen_PIR", new = "ON")
def pir_living_room(self, entity, attribute, old, new, kwargs):
#FML
self.turn_on("light.0x000b57fffe22d28c_light", brightness_pct = 85, transition = 3)
self.turn_on("light.0x000d6ffffea91d6e_light", brightness_pct = 95, transition = 3)
self.turn_on("light.0x000d6ffffec7c83d_light", brightness_pct = 95, transition = 3)
It’s because theres two plugin in one class, right?
That worked before i updated, now it doesn’t.
I saw posts about a fix (splitting it into two app), but thats kinda shitty ( i have 30-35 apps).
Is there a way to fix my apps without spitting them up?
Any help would be greatly appreciated!