NEW VERSION
Changelog
- 2024-06-02: Blueprint Input Sections for enhanced Descriptions.
Hi, I get this error in log, even with v2024-06-02
The device name is Cube and the topic name is zigbee2mqtt/Cube, Z2M is v1.39.0
Logger: homeassistant.helpers.template
Source: helpers/template.py:2629
First occurred: 12:47:44 (1 occurrences)
Last logged: 12:47:44
Template variable warning: list object has no element 1 when rendering '{{ieee_id_long.split('_')[1] }}'
What do you have for the topic?
It appears that whatever you have in there is freaking it out, as that note in the documentation states.
number.cube_last_side
)homeassistant/number/0x00158d00042d6c35/last_side/config
homeassistant/status
2 most recently received message(s)Transmitted messages:
homeassistant/number/0x00158d00042d6c35/last_side
5 most recently transmitted message(s)
That’s the entity that the blueprint creates for tracking the last side, what is the topic for the cube itself?
sensor.cube_battery
)homeassistant/sensor/0x00158d00042d6c35/battery/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_action_angle
)homeassistant/sensor/0x00158d00042d6c35/action_angle/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_device_temperature
)homeassistant/sensor/0x00158d00042d6c35/device_temperature/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_action_from_side
)homeassistant/sensor/0x00158d00042d6c35/action_from_side/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_action_side
)homeassistant/sensor/0x00158d00042d6c35/action_side/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_action_to_side
)homeassistant/sensor/0x00158d00042d6c35/action_to_side/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_side
)homeassistant/sensor/0x00158d00042d6c35/side/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
sensor.cube_action
)homeassistant/sensor/0x00158d00042d6c35/action/config
zigbee2mqtt/bridge/state
3 most recently received message(s)
zigbee2mqtt/Cube/availability
2 most recently received message(s)
zigbee2mqtt/Cube
10 most recently received message(s)Transmitted messages:
homeassistant/device_automation/0x00158d00042d6c35/action_shake/config
homeassistant/device_automation/0x00158d00042d6c35/action_wakeup/config
homeassistant/device_automation/0x00158d00042d6c35/action_fall/config
homeassistant/device_automation/0x00158d00042d6c35/action_rotate_right/config
CLOSE
OK
It looks like a good ID from what I can see. By all the info it appears to be working and what you passed to me says it’s a warning.
Would you be so kind to add this as an issue against the github?
Assuming you are working albeit with a spam in the log, I will think a bit and try to recreate it.
I may have a question as I go or want you to test something if you could, we’ll see.
Link to issues: Issues · SirGoodenough/HA_Blueprints · GitHub
I need some really basic help…
I have the Cub configured via Zigbee2MQTT, not ZHA. The device shows up as a MQTT device in HA, but doesn’t let me select it when configuring the blueprint.
Do I need to also configure it using ZHA? I thought my zigbee radio could only talk to z2m or ZHA but not both.
I am very sorry about that. I had the wrong copy-paste when I updated all 20 blueprints earlier week.
The correct file with the correct link are there now. You can remove the ZHA related blueprint.
You can remove the number helper and any automations this created as well.
Great! I got it working now—except that my cube is not reporting a side 0, while is reporting a side 6. Your descriptions say that side 1 is with the Aqara logo facing up, but there are no actions for side 6. I also cannot get any side 0 actions to trigger
I have some that report that theirs works 0 to 5 like mine, others 1 to 6 like yours. I have not got to the bottom of why.
Does your cube report 0 when the side with 6 pips is up? Why not make the blueprint read 0 or 6 for the triggers? Since there’s no overlap in the range there
I chased a report like this before, and it was something else, but please do a bug report on my github and when I return from holiday I will look at it.
First, thank you for this blueprint, I’m just starting with zigbee and I’ve learned a lot from this (also saves a lot of work ). I was having trouble with the number.last_side
entity not working, then realized it was turning unavailable after some minutes, in the end it was because for some reason my mqtt broker was sending the LWM for homeassistant/status
topic, and HA was recording mqtt client disconnected
in the logs, the issue fixed itself after updating HA to the latest version.
Anyway, all that to say I was analyzing the blueprint and noticed that the last_side entity is not using the action_from_side data reported when flip90 action is triggered, this creates a scenario when, if you lift the cube and change sides then flip 90º from and to specific sides (group 3 actions) will not trigger because there was no action to sync the last side entity.
So I added an extra condition in the last_side variable:
last_side: >
{# Check if there is action_from_side data and use that first.#}
{% if trigger.payload_json.action_from_side is number %}
{{ trigger.payload_json.action_from_side | int(0) }}
{# The first time it will not be there, so make sure its 0 instead of undefined. #}
{% elif not num_ha_val in ["undefined", "unknown", "unavailable", "none", "null", ""] %}
{{ num_ha_val }}
{% else %}
0
{% endif %}
With this the flip90 actions are more reliable.
Also, the slide action for side 3 is in the wrong group.
Did you do a pull request on github? I’ll go look at it so I know what you are saying exactly.
I’m not very used to git yet but I made the pull request to ease things up.
Woah, just got my old cube and … found this. Thanks!
Logger: homeassistant.helpers.template
Source: helpers/template.py:2742
First occurred: 15:36:08 (13 occurrences)
Last logged: 16:12:46
Template variable warning: list object has no element 1 when rendering '{{ieee_id_long.split('_')[1] }}'
Could this be fixed? Please.
Hi Routout,
The error is complaining about the device name. Verify you have the device properly configured as a ZHA device.
I don’t have any other reports of an issue with this one and have not changed anything for months.
Hi! It’s z2m device. This warning have been in the logs for ages. I just updated the script, deleted old automation and pasted old yaml in the configuration and this still pops up.