This is a tough one because I actually like how you implemented it in the game, even if it's not 100% by the book. I'm going to summarize a few rules that are relevant to the discussion:
- Dim Light vs Darkness - Per PHB page 183, Dim Light imposes Disadvantage on Wisdom (Perception) checks to see something, because Dim Light applies the Lightly Obscured condition. Full Darkness imposes the Heavily Obscured condition, which is effectively Blindness. Attacking a target while you are Blind means you have Disadvantage on the roll.
- Disadvantage on Passive Checks - Per PHB page 175, having Disadvantage on a check imposes a -5 penalty to the passive check. So, if a character normally had a Passive Perception of 15 (10 + 3 Wisdom + 2 Proficiency points), but did not have Darkvision and was passively looking for something in Dim Light, they would have a passive Perception score of 10 (15 regular - 5 from Disadvantage).
In the game currently, if a character that does not have Darkvision attacks an enemy in Dim Light, the game imposes Disadvantage on the roll. You can make the argument that the non-Darkvision character cannot 'see' the enemy, which makes them effectively attacking an invisible enemy so then they would be at disadvantage. However, if the non-Darkvision character has a high enough Passive Perception, they could still 'see' the target in Dim Light per the rules of 5e, and thus attack it normally. I'm not sure if this check of the character's Passive Perception against some DC of the enemies (stealth if actively stealthing for example) is being made behind the scenes or not.
The basic gist is that most of the time, a non-Darkvision character can attack a target in Dim Light without disadvantage. However, I think how it works now is fantastic and really raises the value of proper lighting and races/features that grant Darkvision. I just wanted to point it out in case it comes up later in testing/discussion.