Hi @farmio
i finally had a chance to continue on this and have a deeper look into it. Took me a while until i figured out that i needed to separate and create three sensors (like you wrote in your last post
)
So i finally my trigger event looks like this:
- trigger:
platform: event
event_type: knx_event
event_data:
destination: "12/0/4"
sensor:
- name: "Enertex PSU Last Bus Reset-Time Day-hr"
state: "{{ trigger.event.data.data[0] }}"
- name: "Enertex PSU Last Bus Reset-Time min"
state: "{{ trigger.event.data.data[1] }}"
- name: "Enertex PSU Last Bus Reset-Time sec"
state: "{{ trigger.event.data.data[2] }}"
However, i am struggling and running in circles since three evenings/nights with converting and exctracting the weekday and the hour from 'sensor.enertex_psu_last_bus_reset_time_day_hr'
.
I understood your way how to do it in your Python script, but i cannot figure out how to accordingly template it into a new sensor as i couldn’t figure out how to do the AND operation and bitwise move in Jinja2. I even asked ChatGPT (which quite helped me a lot already ;-))
I tried several syntax in Templating, but without success e. g.
enertex_psu_last_bus_reset_weekday:
friendly_name: "Enertex PSU Last Bus Reset Weekday"
value_template: >-
{% set day_hr_dec = states('sensor.enertex_psu_last_bus_reset_time_day_hr') | int %}
{% set weekday = ((day_hr_dec and 0xE0) / 32) %}
{% if weekday in [1,2,3,4,5,6,7] %}
{{ {1: 'Monday', 2: 'Tuesday', 3: 'Wednesday', 4: 'Thursday', 5: 'Friday', 6: 'Saturday', 7: 'Sunday'}[weekday] }}
{% else %}
No day
{% endif %}
{% set day_hr = states('sensor.enertex_psu_last_bus_reset_time_day_hr') | int %}
{% set weekday = ((day_hr and 0xE0) >> 5) %}
{{ weekday }}
{% set day_hr_dec = states('sensor.enertex_psu_last_bus_reset_time_day_hr') | int %}
{% set day_hr_hex = '{:x}'.format(day_hr_dec) %}
{% set weekday = ((day_hr_dec | int) and 0b11100000) // 256 %}
All of these no success unfortunately 
I just was thinking of calling it via a python script and using your operations from your script, but unfortunately i’m struggling with getting to work a python script accordingly…
Do you have any idea or hint how to realize this?
Last question: Isn’t the pythin coinversation you posted me the solution i would need? I mean, if i understand it correctly it is integrating the DPT 10.001 Time or not? 
Thanks in advance.
Br Dino