i am trying to expose volume_level of a media_player entitiy to my knx bus. preferably in DPT 5.001.
according to the developer tools, volume_level a floating value reaching from 0 to 1.
is there an easy way to convert and expose this value?
If not, i guess a dirty automation + knx_send could be of help.
Hints and/or working snippets welcome!
Why would that be dirty? Just multiply by 100 (or by 255 to get HA and KNX native percent) and send it.
Alternatively create a template multiplying it to equal percent and expose that entity.
Because it seems like automations are the wrong use-case for it.
Do you happen to have code snippets ready for both cases? Id accept a workaround.
I am quite new to HA. Especially interested in the template approach.