Previous code used the state topic which is obviously wrong: - The state topic is already used to select optimistic mode. - A light with only the state topic but no command topic would still announce the capability.