I'm trying to write a custom sensor that inherits BaseSensorOperator and SSHOperator. in the sensor body I override poke and execute method.
class mysensor (BaseSensorOperator,SSHOperator):
template_fields = ("my_param")
def __init__ (
self,
my_param = None,
*args,
**kawags):
self.my_param = my_param
super().__init__(
command = "some bash command",
ssh_conn_id = "some connection"
*args,
**kwargs)
def poke(self, context):
... (implemented poke)
def execute():
...(implemented execute)