Custom Component / Automation / Python - Help Needed

I’m trying something a little bit more advanced now, with a custom component. This is definitely playing the long game, I don’t expect result straight away.

What I’m trying to do at the minute is pass it a config which is dictionary pairs, then split them into key and values. then log them. Long term is to do bi-directional updates to get slider_inputs controlling lights including off below a certain threshold.

Configuration:

slider_update:
  - light.globe: input_slider.light1
  - light.tangerine: input_slider.light1

custom_component:

import logging
import homeassistant.loader as loader
from homeassistant.components import light
from homeassistant.helpers.event import async_track_state_change

DOMAIN = 'slider_update'
DEPENDENCIES = ['light']
LOGGER = logging.getLogger(__name__)

def setup(hass, config):
    LOGGER.info("The 'slider_update' component is ready!")

    CONF_PAIRS = config[DOMAIN]
    LOGGER.info(CONF_PAIRS)

Returns:

custom_components.slider_update: The 'slider_update' component is ready!

custom_components.slider_update: [OrderedDict([('light.globe', 'input_slider.light1')]), OrderedDict([('light.tangerine', 'input_slider.light1')])]

When I start trying to get the keys or values it fails…

_LIGHTS = CONF_PAIRS.keys()
LOGGER.info(_LIGHTS)

I’m sure it’s a noob mistake with syntax as I haven’t used Python in this way before so am just finding my feet.

Thanks for any help
Christian