MizterB / homeassistant-infinitude-beyond

Home Assistant custom component for controlling Carrier Infinity Touch thermostats through an Infinitude proxy server.
17 stars 3 forks source link

Call_service:Set_Hold_Mode inconsistent with previous integration function. #16

Closed njobrien1006 closed 2 weeks ago

njobrien1006 commented 2 months ago

I previously used the set_hold_mode to automatically set Furnace to sleep mode as well as switching back to scheduled. Reviewing the new code, old code and documentation am curios if the intent is to change the operation of the service call vs previous integration? Code is wrong? Documentation is wrong?

I've been unsuccessful getting set_hold_mode to work with any combination yet.

I'd be willing to do the work to make it work (and the PR) just was looking to understand intent before spending the time.

MizterB commented 1 month ago

The intent was to be consistent with the previous integration - what are you seeing that is different?

njobrien1006 commented 1 month ago

In the OLD integration, the PARAMs of the call were a KWARGS value. You could then elect to send specific PARAMs to the call. Nothing was really required and everything had a default.

The way the new async call is, it has 2 required PARAMs and an optional Time. The optional time element seems to have certainly changed to a seconds based offset. Whereas before, it was a 00:00-23:45 string value.

Certainly, ways to call the integration to get around this service call but, the one thing I have trouble with is HOLD_UNTIL. I want to HOLD_UNTIL 23:00 which is 2 Activities out (not one). Also, can calculate seconds until desired time and do that way but is inconsistent and not documented like that in the services.yaml

2024-08-02_11-01-49

MizterB commented 2 weeks ago

Fixed in 2024.8.2. The Action / Service has been modified - if you use UI mode, it will ensure that the proper values are being passed.

njobrien1006 commented 1 week ago

I updated to 2024.8.3.

Maybe my confusion resides in the error it is throwing in the Actions-UI and not necessarily the call itself. There is an error being thrown here. The response from the API is XML not JSON.

2024-08-23_15-35-56

njobrien1006 commented 1 week ago

Picture is not so legible. Here is the actual log:

2024-08-23 15:21:54.513 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] POST http://192.168.200.242:34567/api/1/hold with {'hold': 'on', 'activity': 'home', 'until': '16:00'} and {}
2024-08-23 15:21:55.536 DEBUG (MainThread) [custom_components.infinitude_beyond.infinitude.api] POST RESPONSE from http://192.168.200.242:34567/api/1/hold with {'hold': 'on', 'activity': 'home', 'until': '16:00'} and {} is: <?xml version="1.0" encoding="UTF-8"?>
<system version="1.7"><config><blight>10</blight><blowerActualCFM/><blowerCoolingCFM/><blowerHeatingCFM/><blowerPower/><blowerSpeed>1023</blowerSpeed><calcMinCFM>340</calcMinCFM><cfgauto>on</cfgauto><cfgchgovr>30</cfgchgovr><cfgcph>4</cfgcph><cfgdead>2</cfgdead><cfgem>F</cfgem><cfgfan>on</cfgfan><cfghumid>on</cfghumid><cfgpgm>on</cfgpgm><cfgrecovery>on</cfgrecovery><cfgsimultheatcool/><cfgtype>heatcool</cfgtype><cfguv>off</cfguv><cfgvent>off</cfgvent><cfgzoning>on</cfgzoning><ducthour>13</ducthour><erate>0.12</erate><filterinterval>6</filterinterval><filtertype>air filter</filtertype><filtrrmd>on</filtrrmd><fueltype>gas</fueltype><gasunit>therm</gasunit><grate>0.90</grate><heatsource>system</heatsource><humidityfan>off</humidityfan><huminterval>12</huminterval><humoff>0</humoff><humrmd>on</humrmd><mode>cool</mode><odtmpoff>0</odtmpoff><screensaver>off</screensaver><sound>off</sound><staticPressure>0.45</staticPressure><statpressmon>off</statpressmon><systemCFM>1390</systemCFM><torqueControl>off</torqueControl><uvinterval>12</uvinterval><uvrmd>on</uvrmd><vacat>off</vacat><vacend/><vacfan>off</vacfan><vacmaxt>80.0</vacmaxt><vacmint>68.0</vacmint><vacstart/><ventinterval>90</ventinterval><ventrmd>on</ventrmd><weatherPostalCode>54162</weatherPostalCode><humidityAway><humid>manual</humid><humidifier>on</humidifier><rclg>14</rclg><rclgovercool>on</rclgovercool><rhtg>9</rhtg><ventclg>off</ventclg><venthtg>off</venthtg><ventspdclg>high</ventspdclg><ventspdhtg>high</ventspdhtg></humidityAway><humidityHome><humid>manual</humid><humidifier>on</humidifier><rclg>5</rclg><rclgovercool>on</rclgovercool><rhtg>9</rhtg><ventclg>auto</ventclg><venthtg>auto</venthtg><ventspdclg>high</ventspdclg><ventspdhtg>high</ventspdhtg></humidityHome><humidityVacation><humidifier>off</humidifier><rclg>15</rclg><rclgovercool>off</rclgovercool><rhtg>9</rhtg><ventclg>off</ventclg><venthtg>off</venthtg><ventspdclg>high</ventspdclg><ventspdhtg>high</ventspdhtg></humidityVacation><utilityEvent><demandClAbs>82</demandClAbs><demandHtAbs>60</demandHtAbs><demandOffset>4</demandOffset><demandResp>offset</demandResp><enabled>false</enabled><maxLimit>90</maxLimit><minLimit>50</minLimit><priceClAbs>82</priceClAbs><priceHtAbs>60</priceHtAbs><priceLimit>10</priceLimit><priceOffset>4</priceOffset><priceResp>offset</priceResp><restoreDefaults>off</restoreDefaults></utilityEvent><wholeHouse><hold>off</hold><holdActivity>none</holdActivity><otmr/><activities><activity id="home"><blight>10</blight></activity><activity id="away"><blight>0</blight></activity><activity id="sleep"><blight>0</blight></activity><activity id="wake"><blight>0</blight></activity><activity id="manual"><blight>10</blight></activity></activities></wholeHouse><windowprotect><enabled>on</enabled><rhtg>1</rhtg><ventprotect>on</ventprotect></windowprotect><zones><zone id="1"><airflowlimit>high</airflowlimit><cfmlimit>3375</cfmlimit><enabled>on</enabled><hold>on</hold><holdActivity>home</holdActivity><name>ZONE 1</name><otmr>16:00</otmr><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>73.0</clsp><fan>off</fan><htsp>69.0</htsp></activity><activity id="away"><clsp>74.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="sleep"><clsp>73.0</clsp><fan>high</fan><htsp>69.0</htsp></activity><activity id="wake"><clsp>71.0</clsp><fan>off</fan><htsp>69.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>away</activity><enabled>on</enabled><time>10:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>21:30</time></period></day><day id="Tuesday"><period id="1"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>21:30</time></period></day><day id="Wednesday"><period id="1"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>21:30</time></period></day><day id="Thursday"><period id="1"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>21:30</time></period></day><day id="Friday"><period id="1"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>away</activity><enabled>on</enabled><time>10:00</time></period><period id="2"><activity>home</activity><enabled>off</enabled><time>00:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>wake</activity><enabled>on</enabled><time>20:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="2"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 2</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="3"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 3</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="4"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 4</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="5"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 5</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="6"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 6</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="7"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 7</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone><zone id="8"><airflowlimit>high</airflowlimit><cfmlimit>0</cfmlimit><enabled>off</enabled><hold>off</hold><holdActivity/><name>Zone 8</name><otmr/><setback>on</setback><tempoffset>0</tempoffset><activities><activity id="home"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="away"><clsp>80.0</clsp><fan>off</fan><htsp>60.0</htsp></activity><activity id="sleep"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="wake"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity><activity id="manual"><clsp>76.0</clsp><fan>off</fan><htsp>68.0</htsp></activity></activities><program><day id="Sunday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Monday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Tuesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Wednesday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Thursday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Friday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day><day id="Saturday"><period id="1"><activity>home</activity><enabled>on</enabled><time>06:00</time></period><period id="2"><activity>away</activity><enabled>on</enabled><time>08:00</time></period><period id="3"><activity>home</activity><enabled>on</enabled><time>17:00</time></period><period id="4"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period><period id="5"><activity>sleep</activity><enabled>on</enabled><time>22:00</time></period></day></program></zone></zones></config></system>
2024-08-23 15:21:55.537 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: unexpected character: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step
response_data = await self._async_run_long_action(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action
return await long_task
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/config/custom_components/infinitude_beyond/climate.py", line 370, in async_set_hold_mode
await self.zone.set_hold_mode(
File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 814, in set_hold_mode
await self._infinitude._post(endpoint, data)
File "/config/custom_components/infinitude_beyond/infinitude/api.py", line 91, in _post
resp_json: dict = await resp.json(content_type=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 80, in json
return await super().json(*args, loads=loads, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1215, in json
return loads(stripped.decode(encoding))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/json.py", line 44, in json_loads
return orjson.loads(__obj) # type:ignore[no-any-return]
^^^^^^^^^^^^^^^^^^^
orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0)
njobrien1006 commented 1 week ago

I added the broad-except to the post to catch the remaining exceptions. The service call is then happy from the UI or Node-Red. The post response isn't used for anything so not sure that even attempting the decode is needed.

async def _post(self, endpoint: str, data: dict, **kwargs) -> dict:
        """Make a POST request to Infinitude."""
        url = f"{self.url}{endpoint}"
        try:
            _LOGGER.debug("POST %s with %s and %s", url, data, kwargs)
            async with self._session.post(url, data=data, **kwargs) as resp:
                _LOGGER.debug(
                    "POST RESPONSE from %s with %s and %s is: %s",
                    url,
                    data,
                    kwargs,
                    await resp.text(),
                )
                resp.raise_for_status()
                resp_json: dict = await resp.json(content_type=None)
                return resp_json
        except ClientError as e:
            _LOGGER.error(e)
        except Exception as e:  # pylint: disable=broad-except
            _LOGGER.warning(
                "Error in response decode: %s",
                e,
            )
            return None
MizterB commented 1 week ago

@njobrien1006 Based on your screenshot, you are encountering this Infinitude issue: https://github.com/nebulous/infinitude/issues/185

To resolve, you need to update to the latest version of Infinitude. If using a container, you will need to rebuild it to pick up the changes.

njobrien1006 commented 1 week ago

🤯😵‍💫

Thank you. Apologies for not detecting the other issues this was flagged in. Probably a good opportunity to switch to a HA add on container.