betaboon / philips-airpurifier-coap

💨 Philips AirPurifier custom component for Home Assistant. With support for new Devices with CoAP protocol. Tested on AC2729/10 (bought early 2020)
70 stars 31 forks source link

add machine-readable filter-times #21

Closed betaboon closed 3 years ago

betaboon commented 3 years ago

we're exposing filter-times as human readable. multiple users have reported the need for machine-readable filter-times for better integration with automation.

betaboon commented 3 years ago

relevant comments from #4

Another question regarding the remaining time for all filters: Currently you convert them to a non standard format which is hard to handle in HA automations. The original remaining time is just hours, which is very handy regarding HA scripting. Is there any reason why you convert them to "166 days, 14:00:00"?

i chose a representation that is human-readable.

I understand this, but it is not machine readable which should be in my opinion the priority for a HA integration for a sensor. For the UI (and the human readability) it could be converted via templating. But anyway, this are just my two cents ;)

I also would like to add to @nicx point on remaining time for filter: making it human readable means it's harder to assign any automations to it (for example: be notified when filter needs change). if you're ok with it, I can try to add new attributes with remaining time in hours instead of human readable.

betaboon commented 3 years ago

@nicx @arthurgeek i just released a new version which includes the raw, machine-readable filter-times

nicx commented 3 years ago

@betaboon great, thanks a lot!