Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
reiniertc authored Jun 12, 2024
1 parent 24d4390 commit 3f6f90c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/magister_rooster/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def filter_summary(self, summary):
if self._regex_pattern:
match = self._regex_pattern.search(summary)
if match:
return match.group(0) # Adjust this if you need a specific group from the regex match
return summary
return match.group(0) # Return the matched part
return summary # Return the original summary if no match

class VolgendeSchooldagSensor(MagisterRoosterBaseSensor):
def __init__(self, hass, name, url, regex_pattern=None):
Expand Down

0 comments on commit 3f6f90c

Please sign in to comment.