Light_group only second group is working

I am trying to setup two light group. In each group I have 3-3 yeelight auto discovery lights.

light:
  - platform: group
    name: Yeelight Lights
    entities:
      - light.yeelight_ceiling_7c49ebb212
      - light.yeelight_ceiling_7c49ebb3a0
      - light.yeelight_ceiling_7c49ebb3a6
  - platform: group
    name: Yeelight Lights 2
    entities:
      - light.yeelight_ceiling_7c49ebb380
      - light.yeelight_ceiling_7c49ebb39e
      - light.yeelight_ceiling_7c49ebb3a7

customize:
  light.ceiling_lights:
    friendly_name: "Yeelight Lights"
    icon: mdi:ceiling-light
  light.lamp_lights:
    friendly_name: "Yeelight Lights 2"
    icon: mdi:ceiling-light

group:
  light_group:
    name: "Light Group"
    control: hidden
    entities:
      - light.ceiling_lights
      - light.lamp_lights

The problem: only second group (Yeelight Lights 2) working correctly.

First group (Yeelight Lights) is working totally wrong, as you can see on the video.

There is also one more little problem, sometimes when I restart server for first group the switch is howing “Unavailable” - for some reason.

In log, when I trigger first group:

2018-10-01 21:30:59 ERROR (MainThread) [homeassistant.helpers.entity] Update for light.semmi fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 223, in async_update_ha_state
    yield from self.async_device_update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 350, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/group.py", line 233, in async_update
    self._supported_features |= support
TypeError: unsupported operand type(s) for |=: 'int' and 'str'

Given the configuration in your original post, the name of the two light groups are light.yeelight_lights and light.yeelight_lights_2, not light.ceiling_lights and light.lamp_lights.

I would suggest changing your configuration from the original above, to this:

light:
  - platform: group
    name: Ceiling Lights
    entities:
      - light.yeelight_ceiling_7c49ebb212
      - light.yeelight_ceiling_7c49ebb3a0
      - light.yeelight_ceiling_7c49ebb3a6
  - platform: group
    name: Lamp Lights
    entities:
      - light.yeelight_ceiling_7c49ebb380
      - light.yeelight_ceiling_7c49ebb39e
      - light.yeelight_ceiling_7c49ebb3a7
customize:
  light.ceiling_lights:
    icon: mdi:ceiling-light
  light.lamp_lights:
    icon: mdi:ceiling-light
group:
  light_group:
    name: "Light Group"
    control: hidden
    entities:
      - light.ceiling_lights
      - light.lamp_lights

Thank you for the recommendation, in the meantime I found the real reason why it failed: for one lamp I changed supported_features to “3”, but it should be without quotes.