Configuration GUI in HA. How to do simple things through Automation tab

Hi,
I am totally new to HAAS.IO and Z-Wave so looking for some guidance.
I am using the latest version of HAAS.IO (Version 189) on a Raspberry Pi 3.
I have the following hardware:

Raspberry Pi 3
USB Z-Wave ZW090 stick
Aeotec ZW098 LED Bulb
HIKVision DS-2DE-3304W-DE Camera
Envoy (old Model) Solar Monitor
So Far I have been able to get things to work by reading through the forum as well as the www generally.

I have hit a knowledge barrier and don’t know how to go further with what I am trying to learn.
This is a learning exercise to start with …

My issue is relatively simple in that I have an automation on Line crossing on my camera.
This is what I can see from the Automation Integration

- id: '1571203916476'
  alias: Front Door Camera Line Crossing
  description: B to A Line Crossing Front Door Camera
  trigger:
  - entity_id: binary_sensor.ip_dome_line_crossing
    platform: state
  condition: []
  action:
  - data:
      entity_id: light.aeon_labs_zw098_led_bulb_level
    service: light.turn_on"

This actually works but what I want to do is to be able to set the color of the LED Bulb to RED rather than warm white.
I have tried a number of things but none seem to work.

Is there some documentation on how I can achieve this?
If someone can show me how to fix this problem as well I would be grateful.

Other goals would be to have a slider to change color’s, temperature etc but I guess that still on the drawing board.
Thanks to all for great work on this so far.
Ron

Ron, first, welcome to the forum.
The title of your post has nothing to do with what you want to achieve.
Different devices have different interfaces with different api’s and often completely different attributes.
HA tries to mediate this by providing a plugins layer for the different platforms, a hardware abstraction layer if you will.
This allows the command to turn on a light switch to look very similar to the command to turn on a socket outlet. Whether you are talking to a z-wave device, zigbee, X10, WiFi … You get the idea
In this case you have found the command to turn a light on.
But in your case (I’ll have to take your word for it, I don’t have one of these bulbs) you want it to be red.
A typical command for a light (in full) may look like the below (this is from memory) .

    - service: light.turn_on
      entity_id: light.mynewlight
        brightness_pct: 60
        rgb: [255, 0, 0]

Actual coding may vary bulb to bulb as it may have rgbw or similar
You will have to either search for exact match or experiment.
Reloading automations makes this a lot quicker than restarting
Put an input boolean in you trigger to help with testing

other commands you can use with light.turn_on

    #name: if bed 4 light turns on
  - alias: au_aalight_lghtonbed4
    trigger:
      - platform: state
        entity_id: light.fib_fgd212dim2_bed4_level
        from: 'off'
        to: 'on'
    condition:
      - condition: state
        entity_id: input_boolean.ib_aalight_stop_adjust
        state: 'off'
    action:
      - service: light.turn_on
        data_template:
          entity_id: light.fib_fgd212dim2_bed4_level
          brightness_pct: "{{ states('input_number.in_aalight_bed4_lvl') | int }}"
          
          #### other possible options include using templates to transfer a number from the UI : -
          brightness_pct: >
            {{ states('input_number.in_aalight_all_lvl') | int }}
          transition: >
            {{ states('input_number.in_aalight_transition_time') | int }}
         ## 
          brightness: 200 # brightness is usually 1 to 255
          brightness_pct: 60 # pct stands for percent 1 to 100
          transition: 120 # time taken for the old state to the new state to occur in seconds
         ## colour is a bit trickier as that is VERY harware dependent, example include : -
         rgb: [255,140,0]  
         rgb_color: [255,140,0]
         rgbw: [255,140,0,90]

If those items are exposed by the light then just tap on the light there in the middle of the page and it should show you more options.

Hi,
Thanks for the replies.

Mutt
I Have change the title hopefully to better reflect my goals.
flamingm0e
Thanks for the Tip adjusting the lamp
I tried that and got this
image
It allows me to adjust the brightness and turn the lamp on/off. No color adjustment but I am wondering at the name of the entity. It’s got the word LEVEL at the end which might means something but in my ignorance I don’t know.

In Mutt’s reply he suggested a few things and I tried some simple ones like brightness and rgb but I got errors in my logs
“Invalid data for call_service at pos 1: extra keys not allowed @ data[‘rgb’]”
I tried editing the automations.yaml directly and I lost the automation all together so had to recreate it using the tab below.

I have also tried some other things like a delay. I tried to turn the lamp on delay for 2 minutes and then turn it off. The lamp would turn on but not turn off.
I am a bit lost I am not sure where to go. I am trying to use the automation gui but am struggling with rules and syntax. I am such a noob at the moment.
:slightly_smiling_face:

I will keep on experimenting as all I want to achieve at the moment is
. detect line crossing at the camera (done with integration)
. run and automation
. that triggers on the state change
. action that turns the lamp on, delays for a few minutes (eg 10 minutes) and then turns the lamp off

It seems color might be more complex as I read this in the AEON doco and really don’t know what it means yet.

Anyway I will keep pluggin on and hopefully get enlightened.

Thanks to all
Ron

I have finally got somewhere with being able to configure my AEOTEC ZW098 LED LAMP.
My objective with this project was two fold.
Firstly I wanted to learn more about Home Automation was all about and secondly a small project to get my feet wet.

As I said in my first post, chose the LED LAMP and the Z-Wave USB stick and a RPi 3.
It took me a while to get my head around this because of a simple mistake up front. I assumed too much!
The ZW098 does not do a lot of things if it is not paired in security mode.
I assumed that the z-Wave integration would do it all but it does not (at this stage anyway).

What I needed to do was include

# ZWave
zwave:
    usb_path: /dev/ttyACM0
    network_key: "your own 16 bit hex key here"

in my configuration.yaml and reboot the RPi.
Now I was able to move forward.
I manually Factory Reset the ZW098 and then set it to pair in security mode.
This gave me a lot more options in the z-wave configuration tab


However this then presented me with another knowledge challenge. What to input?
I found the answer in a user guide on smartliving. A spreadsheet that does all the calculations for you.
This is cut and pasted from this user guide
For even more examples, please view this article for Parameter 37 with a downloadable excel programming sheet for easy

calculation: https://aeotec.freshdesk.com/solution/articles/6000104541-parameter-37-examples-and-easy-excelprogrammable-

sheet (https://aeotec.freshdesk.com/solution/articles/6000104541-parameter-37-examples-and-easy-excelprogrammable-

sheet

Once I found this I was able to make my LED do Rainbow colours and so on.

I now have to learn how to introduce this as an action in my automation.

At this stage, my Automation detects a line crossing on my front door camera, a trigger then has actions (that was another trick, multiple actions) that turns the lamp on, delays for 10 minutes and then turns the lamp off.
My next step is to introduce colour…

I hope that this post might be of help to someone else who might be on the same journey.

Cheers