Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


HA integration render and others.
#21
Hi,

I want to basically accomplish what the OP wanted to do but additionally I would like to determine if a renderer is actual in a playing state or not. I was thinking that I could already do that by using the APIs outrate property. Unfortunately it seems that this property is sometimes not updated properly at least for the Bluetooth renderer (Didn't test any other one because I'm not using them). During my testing it looks to me like the outrate stays on what ever value it has when first requesting the get_currentsong command.

Is this a bug or am I doing something wrong?

(07-14-2022, 01:57 PM)kuduacz Wrote: You know what?
It happend to me again!
I mean file disapear. I dont know how.
Anyone have ana idea how to do it pernament?
Or how to use new file in json format in Home Assistant?

If you still would like to know how to use the API in Home Assistant this is a way with the RESTful integration:
Code:
rest:
 - resource: "http://oraclesound.local/command/?cmd=get_currentsong"
   scan_interval: 15
   sensor:
     - name: "Moode Renderer"
       value_template: >
         {% if value_json.file == "Airplay Active" %}
           Airplay
         {% elif value_json.file == "Bluetooth Active" %}
           Bluetooth
         {% elif value_json.file == "" %}
           Brak
         {% else %}
           MPD
         {% endif %}
     - name: "Moode MPD State"
       value_template: >
         {% if value_json.state == "play" %}
           Play
         {% elif value_json.state == "pause" %}
           Pause
         {% elif value_json.state == "stop" %}
           Stop
         {% else %}
           Brak
         {% endif %}
Reply


Messages In This Thread
HA integration render and others. - by kuduacz - 05-23-2022, 11:37 AM
RE: HA integration render and others. - by Nutul - 06-24-2022, 09:08 PM
RE: HA integration render and others. - by Nutul - 06-24-2022, 10:24 PM
RE: HA integration render and others. - by Nutul - 06-24-2022, 11:58 PM
RE: HA integration render and others. - by Snicket - 09-18-2024, 09:54 AM

Forum Jump: