Hi,
I have a device that I can pull data from using a local API. There is one problem: I uses HEX values. So for example: 0D0807E7 = 13.08.2023 (Aug. 13th 2023). If I want to pull the data from the current date, I need to send an API-command that includes the current date in a HEX-string (plus some letters before the actual date-string).
Long story short: Does anybody know how I can “easily” convert the current date into the HEX format needed?
I was thinking of creating a huge template sensor that “simply” pulls the current date and then parses the individual numbers into HEX on a “manual” basis (i.e. day, month, year) and then puts them back together again based on a “library” of decimal → hex numbers. But that seems overly complicated and hardcoding something never sounded like a good idea…
Any ideas would be highly welcome!
Thanks!
2 posts - 2 participants