How to enable "Analyze" feature for OpenClose sensor in auto generated cards?

I have attached an Zigbee OpenClose sensor to my lawnmower. I want to be able to analyze the changes in Open/Close state.

But this is only possible, if I go directly to the item in the settings.
What do I have to change in the item’s setting to get the “analyze” functionality in the card?



Thx in advance!

Use the ‘devices’ or ‘properties’ tabs, not ‘locations’.

1 Like

It is only possible in the ‘properties’ tab, by clicking on “Analyze all” and then deselecting everything that is not wanted.
But that is not very comfortable :frowning:

In a proper installation, it also works to click the item name.
And if you are so keen on that particular one create your own page or widget on the overview page.

I guess I just have to change something in the item definition to get the desired functionality.
That’s why I am asking here, what to do :wink:

Your guess is wrong.
As I said in a proper install it works to click the item. If it does not for you, you have a problem with your underlying setup. Maybe you didn’t persist that item.
But no it is not as simple as to “just” change something about the item definition.

I don’t think you can analyse from the auto generated cards.

You would need to create a custom widget with the action as analyse on your item

1 Like

OK, thank you.
I created a separate page for my lawnmower and use an oh-label-card for analyzing the state.

:slight_smile:

Once you’ve customized a cart from the Properties tab, you can save it as a new Chart page.

1 Like

(Sorry for the late reply, I was cleaning my browser tabs and realized I hadn’t answered.)

You can if you change some options in your item’s “Default List Item Widget” metadata to specify the action to “analyze” and the item(s) as well.

Example - how it should look in the Code tab (but you can change the options in the Design tab too) - replace HS1DSZDoorSensor_DoorSensor with your item name:

value: ""
config:
  action: analyzer
  style:
    --f7-list-item-after-text-color: "=items.HS1DSZDoorSensor.state === 'OPEN' ? 'red' : 'green'"
    --f7-list-item-after-font-weight: "=items.HS1DSZDoorSensor.state === 'OPEN' ? 'bold' : 'normal'"
  actionAnalyzerItems:
    - HS1DSZDoorSensor_DoorSensor

You can omit the section under style:, I kept it for the example, but the important part is to define action and actionAnalyzerItems (which is an array). The empty string for value means that you want to use the default component that the system defines for you (which in this case is a oh-label-item) and only add some configuration.
These defaults are not perfect, for Contact items it might make sense to open the analyzer on click.

1 Like