Announcement

Collapse
No announcement yet.

Thermostat creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Thermostat creation

    Hi,

    This is an old template I created, but I would like to be able to send .5 values to my thermostat. There seem to be no way to do this on the device. I think I have tried every possibilities i could, but no joy. It only accept integer.
    Do you think it would be possible to implement this into the plugin?Click image for larger version

Name:	Capture.png
Views:	168
Size:	75.7 KB
ID:	1576744

    Also I would like to create two buttpons, one to increment the value of the thermostat and one to decrement it. Would it be possible to add a feature to allow to send the actual value of the device +1, and the actual value of the device -1 ? Something like : "payload": "# $$DVR: (ref) :#+0.5", or "payload": "# VALUECALC#+0.5"


    Thanks

    #2
    Hi,

    In the latest beta the controlvalue has been changed from integer to double. Not sure why that was limited to an integer, probably just because I never needed decimals

    Your second request makes perfect sense, allow me to play with it a little to come up with a clean solution (also from a coding perspective). In the meantime, isn't there a MQTT Publish command that allow you to increment up- or down? Many devices have such feature built-in.

    Thanks!
    stefxx

    Comment


      #3
      Thanks!

      I don’nt have a command available for incremention or to lower the value. But, got one for the tv sound level at least haha.
      Attached Files

      Comment


        #4
        Just downloaded the beta. I will play with it tomorrow

        Comment


          #5
          Beta 4.0.8.2 also includes replacement variables and calculations on the payload field.

          If you use a replacement variable that uses a feature reference, you can use 0 for the reference to indicate the current feature.

          So to increment by 0.5, you can use
          Code:
          $$DVR:0:+.5
          It should support also more complex calculations but I haven't really tested that yet.
          stefxx

          Comment


            #6
            Is the 4.0.8.3 rhe last one related to these changes??

            I am curious now, would that allow parentheses ? Ex.

            ($$DVR:0:+$DVR:1: )*5

            ex. Round($$DVR:0: ), 2. …for two decimal

            Also , are al theses changes also available in mqtt publish event actions?

            If available in mqtt receive trigger, I think it would need to be something like : if expression in payload is true

            Comment


              #7
              Originally posted by pistacheL0 View Post
              Is the 4.0.8.3 rhe last one related to these changes??
              Yes.

              ($$DVR:0:+$DVR:1: )*5
              I think so. Please test

              ex. Round($$DVR:0: ), 2. …for two decimal
              No, formulas is something different than calculations.Also, for this specific example, there is already a "Decimals" property.

              Also , are al theses changes also available in mqtt publish event actions?
              No, just in the Feature template, Control Payload. But I could extend it to other fields later if all works as expected.

              If available in mqtt receive trigger, I think it would need to be something like : if expression in payload is true
              Again, maybe later. Let's take one step at a time.
              stefxx

              Comment


                #8
                Thanks for the replies

                Comment


                  #9
                  I didn't think about it, but the template is for multiple thermostat. Using a replacement variable can't point to the actual thermostat.
                  There would ne to have something like #ACTUALVALUE#+.5


                  The plugin now works with double thanks !

                  Comment


                    #10
                    Originally posted by stefxx View Post
                    Beta 4.0.8.2 also includes replacement variables and calculations on the payload field.

                    If you use a replacement variable that uses a feature reference, you can use 0 for the reference to indicate the current feature.

                    So to increment by 0.5, you can use
                    Code:
                    $$DVR:0:+.5
                    It should support also more complex calculations but I haven't really tested that yet.
                    of forget my last post lol

                    Comment


                      #11
                      Everything works perfect thank you so much !

                      Click image for larger version

Name:	Capture.png
Views:	97
Size:	68.9 KB
ID:	1576866

                      Comment

                      Working...
                      X