Set a child sensor's value.

def set_child_value(self, child_id, value_type, value, **kwargs):
        """Set a child sensor's value."""
        children = kwargs.get('children', self.children)
        if not isinstance(children, dict) or child_id not in children:
            return None
        msg_type = kwargs.get('msg_type', 1)
        ack = kwargs.get('ack', 0)
        msg = Message().modify(
            node_id=self.sensor_id, child_id=child_id, type=msg_type, ack=ack,
            sub_type=value_type, payload=value)
        msg_string = msg.encode()
        if msg_string is None:
            _LOGGER.error(
                'Not a valid message: node %s, child %s, type %s, ack %s, '
                'sub_type %s, payload %s',
                self.sensor_id, child_id, msg_type, ack, value_type, value)
            return None
        try:
            msg = Message(msg_string)
            msg.validate(self.protocol_version)
        except (ValueError, AttributeError, vol.Invalid) as exc:
            _LOGGER.error('Not a valid message: %s', exc)
            return None
        child = children[msg.child_id]
        child.values[msg.sub_type] = msg.payload
        return msg_string