[SOLVED] [nest] Setpoint

Since a couple of years i use a Nest thermorstat in my house. Unfortunately it doens’t work properly in openhab. Mainly due to my ignorance. At this moment i would like to get better with rules, But now no idea where to start

My problem with the nest:

When I use setpoint for changing the temperature i send for every 0.5 degrees a request to the server. Because of that the server gets to much requests and blocks my requests for a while.

My solustion:

Now, I have the idea to make an extra item and a rule that only sends the last input to the nest server,

 Setpoint item=Woonkamer_NEST_Thermostat_SP label="Temperatuur Woonkamer nest [%.1f °C]" step=0.5 minValue=13 maxValue=24

Has somebody made something like that? It would really help me out

I haven’t done this before, but it would be simple with an Expire item I think.
You make a proxy item which you will use to control the thermostat from sitemap.
When this item changes, the rule fires and turns on the expiring Item.

When the item expires you send the state of the item to the real nest item.

Example (not tested):

Items:

Number Woonkamer_NEST_Thermostat_SP_Proxy
Switch Thermostat_Timer { expire="10s, command=OFF" }

rules:

rule "Start countdown"
when
        Item Woonkamer_NEST_Thermostat_SP_Proxy changed
then
       Thermostat_Timer.sendCommand(ON)
end

rule "Send Thermostat data"
when
        Item Thermostat_Timer received command OFF
then
       Woonkamer_NEST_Thermostat_SP.sendCommand(Woonkamer_NEST_Thermostat_SP_Proxy.state)
end

Sorry for the late reply.Thanks for you time

i get this error.

2019-01-22 09:40:16.259 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Send Thermostat data': An error occurred during the script execution: Could not invoke method: org.eclipse.smarthome.model.script.actions.BusEvent.sendCommand(org.eclipse.smarthome.core.items.Item,java.lang.String) on instance: null

but the idea is great! and simpel

EDIT

Change state.toString solve the error

rule "Start countdown"
when
        Item Woonkamer_NEST_Thermostat_SP_Proxy changed
then
       Thermostat_Timer.sendCommand(ON)
end

rule "Send Thermostat data"
when
        Item Thermostat_Timer received command OFF
then
       Thermostat_SP.sendCommand(Woonkamer_NEST_Thermostat_SP_Proxy.state.toString)
end