Aight . . . I’m tired of beating my head against this. I have a Honeywell (Total Connect Comfort, Honeywell TH8321WF1001) Thermostat.
I’m trying to implement a “home / away” automation for it (you know . . .leave the house, adjust the temperature set points).
I have tried this 2 ways. One with Node Red, where I “build my object”, which looks like this:
{"target_temp_high":68,"target_temp_low":65,"hvac_mode":"heat_cool"}
I get an error on the climate.set_tempature
call. I can use the UI to change my settings, and they show on both the thermostat, and the web interface. BUT if I try to automate it using either NodeRed via a service call node, or via an automation (ignore the trigger I was going to manually call the automation anyway):
alias: Set Thermostat
description: ""
trigger:
- platform: device
type: changed_states
device_id: 829f7859dbd36186ae8dd12632a574cc
entity_id: media_player.andrew_s_2nd_fire
domain: media_player
condition: []
action:
- service: climate.set_temperature
data:
hvac_mode: heat_cool
target_temp_high: "{{ states('input_number.target_temp_high') }}"
target_temp_low: "{{ states('input_number.target_temp_low') }}"
target:
entity_id: climate.thermostat
mode: single
this automation “compiles” to this:
Executed: March 16, 2022, 11:01:52 AM
Result:
params:
domain: climate
service: set_temperature
service_data:
hvac_mode: heat_cool
target_temp_high: 68
target_temp_low: 65
entity_id:
- climate.thermostat
target:
entity_id:
- climate.thermostat
running_script: false
limit: 10
And to add to the confusion . . . if I use Developer tools to “call service”: A) it works, and B) the YAML looks “identical”:
service: climate.set_temperature
data:
target_temp_high: 70
target_temp_low: 68
hvac_mode: heat_cool
target:
entity_id: climate.thermostat
Am I barking up the wrong tree? Any help would be awesome!
Log:
Logger: homeassistant.components.automation.set_thermostat
Source: components/honeywell/climate.py:267
Integration: Automation (documentation, issues)
First occurred: 11:00:07 AM (8 occurrences)
Last logged: 12:55:17 PM
Set Thermostat: Error executing script. Unexpected error for call_service at pos 1: not enough arguments for format string
While executing automation automation.set_thermostat
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.9/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.9/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/somecomfort/client.py", line 429, in _resp_json
return resp.json()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--[if IE 8 ]> <html class="ie8" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9" xmlns="http://www.w3.org/1999/xhtml"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html xmlns="http://www.w3.org/1999/xhtml">
<!--<![endif]-->
<head><title>
Unexpected Error
</title>
<!--[if IE]>
<style>
.page {
height: auto !important;
}
</style>
<![endif]-->
<script type="text/javascript" src="/portal/Scripts/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery.unobtrusive-ajax.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery.validate.min.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery-ui-1.10.4.min.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery.qtip.min.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery.idletimer.js"></script>
<script type="text/javascript" src="/portal/Scripts/jquery.idletimeout.js"></script>
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/jquery.qtip.truehome.css" />
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/jquery.ui.truhome.css" />
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/Layout.css?v=2.8.42" />
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/Site.css?v=2.8.42" />
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/Buttons.css?v=2.8.42" />
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/EditorTemplates.css?v=2.8.42" />
<link rel="stylesheet" type="text/css" href="/portal/Content/TrueHome/ModalAjaxContentDialog.css?v=2.8.42" />
<script type="text/javascript" src="/portal/Scripts/Common/SessionTimeoutHandler.js?v=2.8.42"></script>
<script type="text/javascript" src="/portal/Scripts/Common/ModalAjaxContentDialog.js?v=2.8.42"></script>
<script type="text/javascript" src="/portal/Scripts/Common/CustomEvents.js?v=2.8.42"></script>
<script type="text/javascript" src="/portal/Scripts/Common/EditorTemplates.js?v=2.8.42"></script>
<script type="text/javascript" src="/portal/Scripts/Common/BrowserDetect.js?v=2.8.42"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33271749-1']);
_gaq.push(['_setDomainName', 'alarmnet.com']);
_gaq.push(['_trackPageview']);
(function ()
{
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<!-- dialog window markup -->
<div id="_verticalGradientBackground">
</div>
<div id="_contentWrapper">
<div id="_leftBackground">
</div>
<div id="_content">
<div id="header">
<div id="header-top">
<ul id="toplinks">
<li><a href="https://www.honeywellhome.com" target="_blank">HoneywellHome.com</a></li>
</ul>
</div>
<div id="logo">
<a href="/portal/">Honeywell Home - My Total Connect Comfort<span></span></a>
</div>
</div>
<div id="menucontainer">
<ul id="menu">
<li class="menulink"><a href="https://www.honeywellhome.com/en/support"
target="_blank">
Contact Us</a></li>
<li class="menudivider"></li>
<li class="menulink">
<a href="/portal/Home/FAQs">FAQs</a></li>
<li class="menudivider"></li>
<li class="menulink">
<a href="/portal/MyAccount">My Account</a></li>
<li class="menudivider"></li>
<li class="menulink">
<a href="/portal/">Control Center</a></li>
<li class="menudivider"></li>
<li class="menulink">
<a href="/portal/Account/LogOff">Sign Out</a></li>
<li class="menudivider"></li>
<li id="greeting">
Welcome
<b>
Andrew</b></li>
</ul>
</div>
<div id="red-grey-line">
</div>
<div id="breadcrumb">
<div class="crumbs">Unexpected Error</div>
</div>
<div id="main">
<noscript>
<div id="NoJavaScript">
This site will not operate without JavaScript enabled. Refer to the FAQs tab on this site to learn about enabling JavaScript for your browser.
</div>
</noscript>
<div id="NoCookies">
This site will not operate without Cookies enabled. Refer to the FAQs tab on this site to learn about enabling Cookies for your browser.
</div>
<div id="unsupportedbrowser">
</div>
<div id="mainContent">
<div id="resetpassword">
<h1>Unexpected Error</h1>
<div class="formfield">
<div class="rounded-bevel-border-topleftcorner">
</div>
<div class="rounded-bevel-border-top">
</div>
<div class="rounded-bevel-border-toprightcorner">
</div>
<div class="rounded-bevel-border-left">
<div class="rounded-bevel-border-right">
<div class="whiteborder">
<div class="white-border-top">
</div>
<div class="white-border-left-side">
<div class="white-border-right-side">
<div id="account-success-whitebox">
<div class="account-success">
<div class="white-border-top">
</div>
<div class="white-border-left-side">
<div class="white-border-right-side">
<img src="/portal/Images/Icons/icon_red_x.gif?v=2.8.42" alt="Error" />
<div class="Success">Error</div>
</div>
</div>
<div class="white-border-bottom">
</div>
</div>
<div class="success-text">
<p>
Sorry, an error occurred while processing your request.
</p>
</div>
</div>
</div>
</div>
<div class="white-border-bottom">
</div>
</div>
<div class="buttonarea">
<div class="buttonwrapper">
<div class="red-button-gray">
<a href="/portal/">Home</a>
</div>
</div>
</div>
</div>
</div>
<div class="rounded-bevel-border-bottomleftcorner">
</div>
<div class="rounded-bevel-border-bottom">
</div>
<div class="rounded-bevel-border-bottomrightcorner">
</div>
</div>
</div>
</div>
</div>
<div id="gatewaylog">
</div>
<div id="_push">
</div>
<div id="_footer">
<div>
Version 2.8.42 - November 10, 2020
</div>
<ul class="left" style="width: 700px;margin-top: 5px;">
<li class="rightborder">
<a href="/portal/Home/TermsAndConditions">Privacy Statement and End User License Agreement</a></li>
<li class="rightborder">
<a href="/portal/Home/TermsConditions">Terms & Conditions</a></li>
<li class="rightborder"><a href="https://www.mytotalconnectcomfort.com/Account/ResetLocalisationCulture">Global Site</a></li>
<li class="rightborder">
<a href="/portal/Home/Feedback">Feedback</a></li>
<li><br/> <a href="https://honeywellhome.com/" target="_blank">©
2022
Resideo Technologies, Inc.</a>
The Honeywell Home trademark is used under license from Honeywell International Inc. All rights reserved.
</li>
</ul>
<ul id="CultureControl">
<li class="rightborder"><a class="culture-link" data-ajax="false" href="/portal/Account/ChangeCulture?lang=en-US&returnUrl=%2Fportal%2FError%3Faspxerrorpath%3D%2Fportal%2FDevice%2FSubmitControlScreenChanges" style="text-decoration: underline;">English</a> </li>
<li><a class="culture-link" data-ajax="false" href="/portal/Account/ChangeCulture?lang=fr-CA&returnUrl=%2Fportal%2FError%3Faspxerrorpath%3D%2Fportal%2FDevice%2FSubmitControlScreenChanges" style="">Français</a></li>
</ul>
</div>
</div>
<div id="_rightBackground">
</div>
</div>
<div id="dialog" style="display: none">
<div class="warning"></div>
<ul>
<li class="header">Your session is about to expire.</li>
<li>You will be logged off in <span id='dialog-countdown' style='font-weight:bold'></span> seconds.</li>
<li>Do you want to continue your session?</li>
</ul>
</div>
<script type="text/javascript">
var sessionTimeoutHandler = new SessionTimeoutHandler(
"#dialog",
"#dialog-countdown",
"Yes",
"No",
'/portal/Account/LogOff',
'/portal/Account/Timeout'
);
sessionTimeoutHandler.Initialize();
</script>
<script type="text/javascript" language="javascript">
$(function ()
{
var isMobileDevice = false;
if (BrowserDetect.browser == "Explorer" && parseFloat(BrowserDetect.version) < 8)
{
$("#unsupportedbrowser").html('The web browser you are using is not supported. A supported browser is required to use Total Connect Comfort. The most recent versions of Chrome, Safari, Firefox and Internet Explorer may be used. Update or download one of these browsers to use Total Connect Comfort.');
}
});
</script>
</body>
</html>
: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 367, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 570, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 668, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 949, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 705, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 444, in async_set_temperature
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/honeywell/climate.py", line 267, in set_temperature
self._device.setpoint_cool = temperature
File "/usr/local/lib/python3.9/site-packages/somecomfort/client.py", line 192, in setpoint_cool
self._client._set_thermostat_settings(self.deviceid,
File "/usr/local/lib/python3.9/site-packages/somecomfort/client.py", line 491, in _set_thermostat_settings
result = self._post_json(url, data=data)
File "/usr/local/lib/python3.9/site-packages/somecomfort/client.py", line 455, in _post_json
return self._request_json('post', *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/somecomfort/client.py", line 443, in _request_json
return self._resp_json(resp, req)
File "/usr/local/lib/python3.9/site-packages/somecomfort/client.py", line 433, in _resp_json
_LOG.exception("Failed to de-JSON %s %s" % req, resp)
TypeError: not enough arguments for format string