The error of object could not be found.
Posted: Sat Jan 04, 2025 7:03 am
Dear Currysmarter team,
I recently bought the Tasmota roller shutter switch from you and successfully integrated it into Home Assistant. I use this configuration in my YAML file:
mqtt:
cover:
- name: "Emanuel Rollladen"
unique_id: "emanuel_rollladen"
qos: 1
command_topic: "cmnd/tasmota_emanuel_rollladen/tuyasend4"
payload_open: "1,0"
payload_close: "1,2"
payload_stop: "1,1"
set_position_topic: "cmnd/tasmota_emanuel_rollladen/shutterposition"
set_position_template: "{{value}}"
position_topic: "stat/tasmota_emanuel_rollladen/RESULT"
position_template: "{{ value_json.Shutter1.Position }}"
availability_topic: "tele/tasmota_emanuel_rollladen/LWT"
payload_available: "Online"
payload_not_available: "Offline"
Unfortunately, I get the following errors in my logs, even though the roller shutter is actually working. What could be the reason for this?
Logger: homeassistant.components.mqtt.cover
Source: components/mqtt/cover.py:431
Integration: MQTT (documentation, issues)
First encountered: 11:42:32 (3406 occurrences)
Last logged: 12:21:14
Template (position_template) returned JSON without position attribute
Logger: homeassistant.helpers.template
Source: helpers/template.py:809
First encountered: 11:42:32 (3406 occurrences)
Last logged: 12:21:14
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":186,"Free":325,"Rules":"ON Shutter1#Target DO if(%value%$!%Var1%) Var1 %value% endif ENDON ON Var1#state DO backlog TuyaSend2 2,%Var1% ENDON ON Power1#state=1 DO rule2 0 ENDON ON Power1#state=0 DO rule2 1 ENDON"}}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"Var1":"100"}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"TuyaSend":"Done"}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"Var4":"100"}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"If":"Done"}, template: {{ value_json.Shutter1.Position }})
Logger: homeassistant.helpers.template
Source: helpers/template.py:2740
First Occurred: 11:42:32 (3800 occurrences)
Last logged: 12:21:14
Template variable error: 'dict object' has no attribute 'Shutter1' when rendering '{{ value_json.Shutter1.Position }}'
Template variable warning: 'dict object' has no attribute 'Var4' when rendering '{{ value_json.Var4 }}'
Template variable warning: 'dict object' has no attribute 'SHUTTER1' when rendering '{{ value_json.SHUTTER1 }}'
Thank you for your help.
-------------
Hello,
Here is the output from the console:
17:08:50.848 RUL: TUYARECEIVED#DPTYPE2ID2 performs "Var4 100"
17:08:50.853 MQT: stat/tasmota_emanuel_rollladen/RESULT = {"Var4":"100"}
17:08:50.897 CMD: Status 0
17:08:50.902 MQT: stat/tasmota_emanuel_rollladen/STATUS = {"Status":{"Module":0,"DeviceName":"Shutter","FriendlyName":["Shutter"],"Topic":"tasmota_emanuel_rollladen","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState" :1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetai n":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
17:08:50.957 MQT: stat/tasmota_emanuel_rollladen/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"firmware/EU-CL02_esp32c3.bin","RestartReason":"Software reset digital core","Uptime":"5T03:49:54","StartupUTC":"2024-12-25T12:18:56","Sleep":50,"CfgHolder":4617,"BootCount":195,"BCResetTime":"2024-12-25T12:58:17","SaveCount":661}}
17:08:51.008 MQT: stat/tasmota_emanuel_rollladen/STATUS2 = {"StatusFWR":{"Version":"13.0.0(Shutter)","BuildDateTime":"2024-05-30T07:41:13","Core":"2_0_10","SDK":"4.4.5.230614","CpuFrequency":160,"Hardware":"ESP32-C3 rev.4","CR":"472/699"}}
17:08:51.037 MQT: stat/tasmota_emanuel_rollladen/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["At Bergers","T-test"],"TelePeriod":30,"Resolution":"558180C0","SetOption":["0000A009","0405C80001000600003C5A0A192800000000","40000080","00006000","00004000","00000000"]}}
17:08:51.083 MQT: stat/tasmota_emanuel_rollladen/STATUS4 = {"StatusMEM":{"ProgramSize":1876,"Free":1003,"Heap":184,"StackLowMark":3,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"164020","FlashFre quency":80,"FlashMode":"DIO","Features":["00000809","9F9A17DF","0011A001","B7F7BFCF", "05DA9BC0","E0360D47","080840D2","20200000","84BC482D","000A80B1"],"Drivers":"1,2,3,4 ,5,7,8,9,10,11,12,14,16,17,20,21,24,27,29,34,35,38,50,52,59,60,62,63,66,67,68,86,87, 88","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,26,31,34,37,39,40, 42,43,45,51,52,55,56,58,59,64,66,67,74,85,92,95,98,103,105,127","I2CDriver":"7,8,9,10,11,12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,58,62,65,69,76,77"}}
17:08:51.171 MQT: stat/tasmota_emanuel_rollladen/STATUS5 = {"StatusNET":{"Hostname":"tasmota-emanuel-rollladen-5140","IPAddress":"10.10.10.119","Gat eway":"10.10.10.1","Subnetmask":"255.255.255.0","DNSServer1":"10.10.10.1","DNSServer2":"0. 0.0.0","Mac":"54:32:04:84:34:14","IP6Global":"fd54:491d:9181::5632:4ff:fe84:3414","IP6Loca l":"fe80::5632:4ff:fe84:3414","Webserver":2,"HTTP_API":1,"WifiConfig":2,"WifiPower":19.0}}
17:08:51.223 MQT: stat/tasmota_emanuel_rollladen/STATUS6 = {"StatusMQT":{"MqttHost":"10.10.10.4","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_843414","MqttUser":"mqttuser","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
17:08:51.263 MQT: stat/tasmota_emanuel_rollladen/STATUS7 = {"StatusTIM":{"UTC":"2024-12-30T16:08:51","Local":"2024-12-30T17:08:51","StartDST":"2024-03-31T0 2:00:00","EndDST":"2024-10-27T03:00:00","Timezone":"+01:00","Sunrise":"08:43","Sunset":"17:01"}}
17:08:51.305 MQT: stat/tasmota_emanuel_rollladen/STATUS10 = {"StatusSNS":{"Time":"2024-12-30T17:08:51","Shutter1":{"Position":100,"Direction":0,"Target":100,"Tilt":0}}}
17:08:51.334 MQT: stat/tasmota_emanuel_rollladen/STATUS11 = {"StatusSTS":{"Time":"2024-12-30T17:08:51","Uptime":"5T03:49:55","UptimeSec":445795,"Heap":182,"SleepMode":"Dynamic ","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":4,"Objects":46},"POWER":"OFF","Wifi":{"AP":1,"SSId":"At Bergers","BSSId":"0C:72:74:D8:4E:F1","Channel":1,"Mode":"11n","RSSI":100,"Signal":-50,"LinkCount":1,"Downtime":"0T00:00:04"}}}
17:08:51.386 MQT: stat/tasmota_emanuel_rollladen/STATUS13 = {"StatusSHT":{"SHT0":{"Relay1":1,"Relay2":2,"Open":100,"Close":100,"50perc":50,"Delay":0,"Opt":"0000","Calib":[300,500,700,900,1000],"Mode":"3"}}}
17:08:51.878 RUL: TUYARECEIVED#DPTYPE4ID1 performs "if (1$!1) Var6 1 endif"
17:08:51.882 MQT: stat/tasmota_emanuel_rollladen/RESULT = {"If":"Done"}
17:08:51.904 RUL: TUYARECEIVED#DPTYPE2ID2 performs "Var4 100"
Many thanks and best regards
I recently bought the Tasmota roller shutter switch from you and successfully integrated it into Home Assistant. I use this configuration in my YAML file:
mqtt:
cover:
- name: "Emanuel Rollladen"
unique_id: "emanuel_rollladen"
qos: 1
command_topic: "cmnd/tasmota_emanuel_rollladen/tuyasend4"
payload_open: "1,0"
payload_close: "1,2"
payload_stop: "1,1"
set_position_topic: "cmnd/tasmota_emanuel_rollladen/shutterposition"
set_position_template: "{{value}}"
position_topic: "stat/tasmota_emanuel_rollladen/RESULT"
position_template: "{{ value_json.Shutter1.Position }}"
availability_topic: "tele/tasmota_emanuel_rollladen/LWT"
payload_available: "Online"
payload_not_available: "Offline"
Unfortunately, I get the following errors in my logs, even though the roller shutter is actually working. What could be the reason for this?
Logger: homeassistant.components.mqtt.cover
Source: components/mqtt/cover.py:431
Integration: MQTT (documentation, issues)
First encountered: 11:42:32 (3406 occurrences)
Last logged: 12:21:14
Template (position_template) returned JSON without position attribute
Logger: homeassistant.helpers.template
Source: helpers/template.py:809
First encountered: 11:42:32 (3406 occurrences)
Last logged: 12:21:14
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":186,"Free":325,"Rules":"ON Shutter1#Target DO if(%value%$!%Var1%) Var1 %value% endif ENDON ON Var1#state DO backlog TuyaSend2 2,%Var1% ENDON ON Power1#state=1 DO rule2 0 ENDON ON Power1#state=0 DO rule2 1 ENDON"}}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"Var1":"100"}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"TuyaSend":"Done"}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"Var4":"100"}, template: {{ value_json.Shutter1.Position }})
Error parsing value: 'dict object' has no attribute 'Shutter1' (value: {"If":"Done"}, template: {{ value_json.Shutter1.Position }})
Logger: homeassistant.helpers.template
Source: helpers/template.py:2740
First Occurred: 11:42:32 (3800 occurrences)
Last logged: 12:21:14
Template variable error: 'dict object' has no attribute 'Shutter1' when rendering '{{ value_json.Shutter1.Position }}'
Template variable warning: 'dict object' has no attribute 'Var4' when rendering '{{ value_json.Var4 }}'
Template variable warning: 'dict object' has no attribute 'SHUTTER1' when rendering '{{ value_json.SHUTTER1 }}'
Thank you for your help.
-------------
Hello,
Here is the output from the console:
17:08:50.848 RUL: TUYARECEIVED#DPTYPE2ID2 performs "Var4 100"
17:08:50.853 MQT: stat/tasmota_emanuel_rollladen/RESULT = {"Var4":"100"}
17:08:50.897 CMD: Status 0
17:08:50.902 MQT: stat/tasmota_emanuel_rollladen/STATUS = {"Status":{"Module":0,"DeviceName":"Shutter","FriendlyName":["Shutter"],"Topic":"tasmota_emanuel_rollladen","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState" :1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetai n":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
17:08:50.957 MQT: stat/tasmota_emanuel_rollladen/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"firmware/EU-CL02_esp32c3.bin","RestartReason":"Software reset digital core","Uptime":"5T03:49:54","StartupUTC":"2024-12-25T12:18:56","Sleep":50,"CfgHolder":4617,"BootCount":195,"BCResetTime":"2024-12-25T12:58:17","SaveCount":661}}
17:08:51.008 MQT: stat/tasmota_emanuel_rollladen/STATUS2 = {"StatusFWR":{"Version":"13.0.0(Shutter)","BuildDateTime":"2024-05-30T07:41:13","Core":"2_0_10","SDK":"4.4.5.230614","CpuFrequency":160,"Hardware":"ESP32-C3 rev.4","CR":"472/699"}}
17:08:51.037 MQT: stat/tasmota_emanuel_rollladen/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["At Bergers","T-test"],"TelePeriod":30,"Resolution":"558180C0","SetOption":["0000A009","0405C80001000600003C5A0A192800000000","40000080","00006000","00004000","00000000"]}}
17:08:51.083 MQT: stat/tasmota_emanuel_rollladen/STATUS4 = {"StatusMEM":{"ProgramSize":1876,"Free":1003,"Heap":184,"StackLowMark":3,"PsrMax":0,"PsrFree":0,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"164020","FlashFre quency":80,"FlashMode":"DIO","Features":["00000809","9F9A17DF","0011A001","B7F7BFCF", "05DA9BC0","E0360D47","080840D2","20200000","84BC482D","000A80B1"],"Drivers":"1,2,3,4 ,5,7,8,9,10,11,12,14,16,17,20,21,24,27,29,34,35,38,50,52,59,60,62,63,66,67,68,86,87, 88","Sensors":"1,2,3,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,26,31,34,37,39,40, 42,43,45,51,52,55,56,58,59,64,66,67,74,85,92,95,98,103,105,127","I2CDriver":"7,8,9,10,11,12,13,14,15,17,18,20,24,29,31,36,41,42,44,46,48,58,62,65,69,76,77"}}
17:08:51.171 MQT: stat/tasmota_emanuel_rollladen/STATUS5 = {"StatusNET":{"Hostname":"tasmota-emanuel-rollladen-5140","IPAddress":"10.10.10.119","Gat eway":"10.10.10.1","Subnetmask":"255.255.255.0","DNSServer1":"10.10.10.1","DNSServer2":"0. 0.0.0","Mac":"54:32:04:84:34:14","IP6Global":"fd54:491d:9181::5632:4ff:fe84:3414","IP6Loca l":"fe80::5632:4ff:fe84:3414","Webserver":2,"HTTP_API":1,"WifiConfig":2,"WifiPower":19.0}}
17:08:51.223 MQT: stat/tasmota_emanuel_rollladen/STATUS6 = {"StatusMQT":{"MqttHost":"10.10.10.4","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_843414","MqttUser":"mqttuser","MqttCount":1,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
17:08:51.263 MQT: stat/tasmota_emanuel_rollladen/STATUS7 = {"StatusTIM":{"UTC":"2024-12-30T16:08:51","Local":"2024-12-30T17:08:51","StartDST":"2024-03-31T0 2:00:00","EndDST":"2024-10-27T03:00:00","Timezone":"+01:00","Sunrise":"08:43","Sunset":"17:01"}}
17:08:51.305 MQT: stat/tasmota_emanuel_rollladen/STATUS10 = {"StatusSNS":{"Time":"2024-12-30T17:08:51","Shutter1":{"Position":100,"Direction":0,"Target":100,"Tilt":0}}}
17:08:51.334 MQT: stat/tasmota_emanuel_rollladen/STATUS11 = {"StatusSTS":{"Time":"2024-12-30T17:08:51","Uptime":"5T03:49:55","UptimeSec":445795,"Heap":182,"SleepMode":"Dynamic ","Sleep":50,"LoadAvg":19,"MqttCount":1,"Berry":{"HeapUsed":4,"Objects":46},"POWER":"OFF","Wifi":{"AP":1,"SSId":"At Bergers","BSSId":"0C:72:74:D8:4E:F1","Channel":1,"Mode":"11n","RSSI":100,"Signal":-50,"LinkCount":1,"Downtime":"0T00:00:04"}}}
17:08:51.386 MQT: stat/tasmota_emanuel_rollladen/STATUS13 = {"StatusSHT":{"SHT0":{"Relay1":1,"Relay2":2,"Open":100,"Close":100,"50perc":50,"Delay":0,"Opt":"0000","Calib":[300,500,700,900,1000],"Mode":"3"}}}
17:08:51.878 RUL: TUYARECEIVED#DPTYPE4ID1 performs "if (1$!1) Var6 1 endif"
17:08:51.882 MQT: stat/tasmota_emanuel_rollladen/RESULT = {"If":"Done"}
17:08:51.904 RUL: TUYARECEIVED#DPTYPE2ID2 performs "Var4 100"
Many thanks and best regards