I implemented some slight changes in order to support 1.x and 2.x hardware versions. This is due to the differences in JSON payloads brought up by @chippoman here and @kalleboo here. I also updated the documentation to reflect the changes needed in the user's config file.
Not really a fan of the duplicated code in my approach but I haven't worked with JavaScript before so there is probably a much better way to implement this. Although, it should be easy to retrofit for any future changes of the sent payload. This fixes the problems I was having with both hardware versions in my house and should also close issues 1 and 3.
I have not tested these changes with the current PR from @cfgCarl but when that does get merged I would be happy to update the documentation and make sure everything works nicely together! 🙂
Hey!
I implemented some slight changes in order to support 1.x and 2.x hardware versions. This is due to the differences in JSON payloads brought up by @chippoman here and @kalleboo here. I also updated the documentation to reflect the changes needed in the user's config file.
Not really a fan of the duplicated code in my approach but I haven't worked with JavaScript before so there is probably a much better way to implement this. Although, it should be easy to retrofit for any future changes of the sent payload. This fixes the problems I was having with both hardware versions in my house and should also close issues 1 and 3.
I have not tested these changes with the current PR from @cfgCarl but when that does get merged I would be happy to update the documentation and make sure everything works nicely together! 🙂