royto / logbook-card

Logbook card for Home Assistant UI Lovelace
GNU General Public License v3.0
204 stars 9 forks source link

hidden_state not working if there are more words in state #59

Closed SteffenM-DE closed 1 year ago

SteffenM-DE commented 2 years ago

I try to hide states with number 061 in it and so i define that:

Screen_20221201-104850

But the card show these lines and I expected both should be hide because there is a '061':

Screen_20221201-103223

Also I define '*' as hidden state and expected there must be nothing in history but no all entries are still showing?

royto commented 2 years ago

Can you show me the state value for this entity the developer tools ?

SteffenM-DE commented 2 years ago

Here you can see the state:

Screen_20221201-141233

royto commented 2 years ago

I didn't reproduce the issue ...

as you can see the first card have the hidden state configured and the second don't have ...

image

image

Make sure to have installed the 1.6.0 where I rename hiddenState into hidden_state

SteffenM-DE commented 1 year ago

1.6.0 is installed and it did not work but did not work with old option and older version too.

Do not know why and can not really reproduce a template:

Screen_20221202-113211

Screen_20221202-113500

royto commented 1 year ago

Can't figured it out why it is not working ...

image

image

can you check in the console (F12 on chrome or Firefox), and look for the card version

image

SteffenM-DE commented 1 year ago

Screen_20221203-110153

I tryed again many variations (creating new cards and entities) but it did not work. Screen_20221203-110514

But something with whitspace is the point. Now I use the logbook with standard person entity:

Screen_20221203-111150 Screen_20221203-111140 Screen_20221203-111129

How you can see 'Ort' ist filtered but not 'Zu Hause' with the filter 'Zu'?!

SteffenM-DE commented 1 year ago

Same at state_map. I can not change the icon or color because the value with wildcard do not work:

Screen_20221226-113512

If I can do something to find the bug let me know.

royto commented 1 year ago

Can you provide me the response payload of a call to the history rest api using the dev tools > network

the URI should be something like https://youinstance/api/history/period/2022-12-21T20:13:20.767Z?filter_entity_id=input_text.it_fritz_lastcaller&end_time=2022-12-26T20:13:20.767Z

If you are concerned about the data, maybe you can send it privately through twitter account or my github email ...

SteffenM-DE commented 1 year ago

Hi, I could not send to you via Twitter so here we are, I have only changed some numbers and characters:

curl -X GET -H "Authorization: Bearer eyJ..." -H "Content-Type: application/json" http://myha:8123/api/history/period/2022-12-21T20:13:20.767Z?filter_entity_id=input_text.it_fritz_lastcaller [[{"entity_id":"input_text.it_fritz_lastcaller","state":"Sa. 15:02: Surname, Steffen (0123456789)\n► Geschäft","attributes":{"icon":"mdi:phone-incoming","friendly_name":"Letzter Anrufer"},"last_changed":"2022-12-21T20:13:20.767000+00:00","last_updated":"2022-12-21T20:13:20.767000+00:00"}]]

royto commented 1 year ago

I think I found the issue. hidden_state should work now.

Can you test the pre-release 1.9.1-beta1

If ok, I'll fix state_map and release a new version

SteffenM-DE commented 1 year ago

Great, is working now. All filters I try on hidden_state are working fine.