Skip to content

Commit

Permalink
Azure IOT only enabled if in config
Browse files Browse the repository at this point in the history
  • Loading branch information
linjmeyer committed May 4, 2023
1 parent fea1a69 commit 29f2230
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pitch/providers/azure_iothub.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(self, config: PitchConfig):
self.config = config
self.str_name = "Azure IoT Hub ({})".format(config.azure_iot_hub_connectionstring)
self.rate_limiter = DeviceRateLimiter(rate=config.azure_iot_hub_limit_rate, period=config.azure_iot_hub_limit_period)

def __str__(self):
return self.str_name

Expand All @@ -35,4 +36,5 @@ def update(self, tilt_status: TiltStatus):
asyncio.run(self.send(tilt_status))

def enabled(self):
return True
enabled = True if self.config.azure_iot_hub_connectionstring else False
return enabled

0 comments on commit 29f2230

Please sign in to comment.