How to recognise that a RF light is on?

I have some lights that I can control through RF. This works, but the issue is that it doesn’t provide feedback, so I don’t know what state the light is in.
I have installed a luminance sensor in the same room, so I can get a read from that and at least at night determine whether the light is on or not (during the day the daylight is so bright that the sensor can’t tell any difference between lights being off or on).
Ideally I would like an icon in my lovelace front-end that shows ‘on’ when the luminance sensor says it’s on, and ‘off’ when it’s not - and even better if I can get to press that button to toggle the light.
And I would be very happy if I could somehow integrate this in my night time routine, so that when I give the command to turn off all the lights in the house, this light gets incorporated - but only if it’s on. At the moment I can’t do that, as it is a pure toggle and most of the times I would turn it on instead of off…
How should I go about this? I’ve looked at template sensors but can’t really get my head around those.

I was going to say, use this to create a template light from your RF light and lux sensor:

but this is a problem:

(during the day the daylight is so bright that the sensor can’t tell any difference between lights being off or on).

Can you reposition the sensor so that some difference is seen between day and the light?

If not, put the RF light where it belongs (in the bin) and spend $20 of a light or switch you can control that has feedback.

I’ll have a look at that template light and see if I can figure it out.
I agree that a zwave switch would be easier, but my electrician had some issues getting that done. Basically I have added a fan to a room that originally only had ceiling lights. So the electrician took power from the ceiling lights to control both, but that means that now the switch will turn both lights and fan on/off. Hence the RF controller that operates both lights and fan, and the switch stays always on.
I’ve looked at smart bulbs, but they are weird LEDs that I can’t find a smart bulb for. So unfortunately I can’t throw the RF controller in the bin without ripping open the ceiling to re-do the wiring… (and it is downstairs, so can’t get to it from the attic either)

Well, I have one place where I don’t have any other option than to use rf switches (unless I willing to break up the floor and the wall to add extra electricity wiring). I replaced my old kaku ( click on, click off) switch with a sonoff rf, the old wall switches are still in place, but now I get feedback in HA from the sonoff part if the lights are on or off.

So I achieved similar (perhaps in a slightly simpler) way using automation.

In the morning, if the light is ‘on’ then I turn if off once the light sensor breaches the normal level the light creates through the sunlight. i.e.

  trigger:
    platform: numeric_state
    entity_id: sensor.lounge_light_83
    above: 38

  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: 'input_select.home_mode'
        state: 'Home'
      - condition: time
        after: '06:30:00'
        before: '09:00:00'
      - condition: state
        entity_id: 'light.livingroom_light_22'
        state: 'on'

I turn on the light in the evening automatically if its going dark and someone is home:

  trigger:
    platform: sun
    event: sunset
    offset: "-00:50:00"
  condition:
    condition: state
    entity_id: group.people
    state: 'home'

and, as my light sensor has a motion sensor, if it’s dark when someone walks in the room in the morning, I turn the light on anyway:

  trigger:
    platform: state
    entity_id: binary_sensor.livingroomsensor_81
    to: 'on'
  condition:
    condition: and
    conditions:
       - condition: or
         conditions:
            - condition: state
              entity_id: input_select.home_mode
              state: 'Home'
            - condition: state
              entity_id: input_select.home_mode
              state: 'Night'
       - condition: time
         after: '01:00:00'
         before: '08:00:00'
       - condition: state
         entity_id: light.livingroom_light_22
         state: 'off'
       - condition: numeric_state
         entity_id: sensor.lounge_light_83
         below: 5

and finally, if nobody moves in the room after a period the light would turn off anyway:

  trigger:
    platform: numeric_state
    entity_id: sensor.livingroom_last_motion
    above: 7200
    for: "00:01:00"
  condition:
    condition: and
    conditions:
       - condition: or
         conditions:
            - condition: state
              entity_id: input_select.home_mode
              state: 'Home'
            - condition: state
              entity_id: input_select.home_mode
              state: 'Night'
       - condition: state
         entity_id: light.livingroom_light_22
         state: 'on'

In essence this means regardless of the switch - if its dark and some one is in the room the light should be turned on. And if it’s light due to the daylight, the light should get turned off.

All in all, it means that in reality, the switch on my wall panel pretty much represents the status of the light in the room as the automation changes the light status regardless of what the switch is set as.

Look into the iFan03 from sonoff (itead).

It’s a direct replacement for a ceiling fan rf controller giving you a remote just like the old fan to control the fan and lights separately and can be integrated into HA to give control and feedback.

And it’s cheap.