DheerajKhajuria / pimatic-mysensors

mysensors
http://forum.mysensors.org/topic/797/pimatic-mysensors-controller-plugin
GNU General Public License v2.0
23 stars 24 forks source link

Bug: Attribute Value handling of MySensorsMulti is broken #46

Closed mwittig closed 8 years ago

mwittig commented 8 years ago

At https://github.com/DheerajKhajuria/pimatic-mysensors/blob/master/MySensors.coffee#L786-L787 the inititial attribute values are assigned to @attributeValue[name]and and getters are created which will return the value. The problem is, however, that value updates will be assigned by calling @_setAttribute() which assigns the value to a different members, i.e. @[attributeName] = value. See also https://github.com/DheerajKhajuria/pimatic-mysensors/blob/master/MySensors.coffee#L853-L856

Suggested fixture:

# change lines 854-655 as follows
 unless @attributeValue[attributeName] is value
        @attributeValue[attributeName] = value

Please also take care of issue #45 . I cannot edit the file. If I do so, I get the following message "You’re editing a file in a project you don’t have write access to. Submitting a change to this file will write it to a new branch in your fork mwittig/pimatic-ifttt, so you can send a pull request."

Thanks in advance!

mwittig commented 8 years ago

@DheerajKhajuria Any news on this one? @theodoc was so kind to a create pull request to fix the issue. Thanks

DheerajKhajuria commented 8 years ago

pull request merged thanks @theodoc @mwittig