Closed btotharye closed 6 years ago
Can you try with (set) (?P<Entity>.*) thermostat to (?P<temp>[0-9]+)
which will require a match of at least one character. adapt runs through subsets of each sentence it's passed and might trigger on an empty temp (.* allows zero character matches, while .+ requires at least one).
The order isn't guaranteed AFAIK so this can be why it works on jenkins but not at home.
Not sure if this is it but it might be worth to test.
I'm just going to close this out I switched over to padatious to get past this for now.
How to submit an Issue to a Mycroft repository
Try to provide steps that we can use to replicate the Issue
On the code https://github.com/btotharye/mycroft-homeassistant/tree/add_climate I have the following regex setup:
(set) (?P<Entity>.*) thermostat to (?P<temp>[0-9]*)
From the message payload I'm getting the below which appears to be finding the temp match group but its not adding it to the actual object it appears so I get key errors when trying to get the temp:
I've tried a lot of different ways but nothing ever seems to hit on this but this matches fine in Pythex and other regex verification tools. Let me know if you need anything else. The jenkins log for the build can be found at the below link which is also running the mycroft testrunner:
https://jenkins.btotharye.com/job/home_assistant_skill/108/console
The odd thing about this jenkins build is it corresponds to commit https://github.com/btotharye/mycroft-homeassistant/pull/50/commits/dba3c6975151f2a344b3929c1d3a4eea491481cc and shows the temp reading right but yet I cannot get this working on the same dev setup locally that I use in jenkins.