Has anyone actually got this working recently?
I can query the fauxapi from my MacBook fine but HomeAssistant will not play ball.
It pulls the rule through as a switch OK, despite multiple entires of
Problem retrieving rule set from pfSense host: X.X.X.X. Likely due to API key or secret.
If you try and do anything with said switch you get this error:
'tracker'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
self._platforms.values(), func, call, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 595, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 621, in async_turn_on
await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/pfsense_rule/switch.py", line 126, in turn_on
self.set_rule_state(True)
File "/config/custom_components/pfsense_rule/switch.py", line 171, in set_rule_state
if (rule['tracker'] == self._tracker_id):
KeyError: 'tracker'
Tried with different versions of fauxapi, different versions of pfSense and also tried a mate who also has home assistant and pfSense but he gets the same errors. Tried adding PfsenseFauxapi to the config directory but still no dice.
My Python skills aren’t very good so hoping someone can point me in the right direction.