npope / home-assistant-crestron-component

Integration for Home Assistant for the Crestron XSIG symbol
Apache License 2.0
59 stars 20 forks source link

How to take an analog join into a number? #5

Open Bagunda opened 2 years ago

Bagunda commented 2 years ago

Please show an example - how to take an analog join into a number in Home Assistant.

Bagunda commented 2 years ago

I found the answer. Thanx.

In configuration.yaml:

input_number:
  slider1:
    name: Slider
    initial: 0
    min: 0
    max: 65535
    step: 1
  box1:
    name: Numeric Input Box
    initial: 0
    min: 0
    max: 65535
    step: 1
    mode: box

crestron:
  port: 16384
  from_joins:
    - join: a1
      script:
        service: input_number.set_value
        data:
          entity_id: input_number.slider1
          value: "{{value|int}}"
    - join: a2
      script:
        service: input_number.set_value
        data:
          entity_id: input_number.box1
          value: "{{value|int}}"

In SIMPL Windows: 2022-02-28_18-19-28

LancerJun commented 1 year ago

Why can't my control system connect to ha

Bagunda commented 1 year ago

Copy all files from this repo to /config/custom_components/crestron image

In configuration.yaml:

input_number:
  slider1:
    name: Slider
    initial: 0
    min: 0
    max: 65535
    step: 1
  box1:
    name: Numeric Input Box
    initial: 0
    min: 0
    max: 65535
    step: 1
    mode: box

crestron:
  port: 16384
  from_joins:
    - join: a1
      script:
        service: input_number.set_value
        data:
          entity_id: input_number.slider1
          value: "{{value|int}}"
    - join: a2
      script:
        service: input_number.set_value
        data:
          entity_id: input_number.box1
          value: "{{value|int}}"

Then Reboot Home Assistant.

In Crestron see my pic above. In Crestron TCP/IP_Client dont forget IP addres to Home Assistant (becouse HA - is TCP/IP server), and port.