The discovery of devices (sample black switch) is now working after the sample postman collection is fixed [reference]. The next problem is that Alexa can't set the state of the switch - always return "sample black switch is not responding".
The problem seems to be in api_handler_directive.py
The discovery of devices (sample black switch) is now working after the sample postman collection is fixed [reference]. The next problem is that Alexa can't set the state of the switch - always return "sample black switch is not responding".
The problem seems to be in api_handler_directive.py
...
alexa_power_controller_response = AlexaResponse(
namespace='Alexa.PowerController',
name=name,
token=token,
correlation_token=correlation_token,
endpoint_id=endpoint_id)
...
that namespace and name should not be included there.
I tried this:
alexa_power_controller_response = AlexaResponse(
token=token,
correlation_token=correlation_token,
endpoint_id=endpoint_id)
alexa_power_controller_response.add_property()
alexa_power_controller_response.add_property(
namespace='Alexa.PowerController',
name='powerState',
value=power_state_value)
It seems working. Can you confirm it is the right fix?