Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions homeassistant/components/wilight/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import calendar
import locale
import re
from typing import Any

import voluptuous as vol
Expand All @@ -26,7 +25,7 @@ def wilight_trigger(value: Any) -> str | None:
if (step == 2) & isinstance(value, str):
step = 3
err_desc = "String should only contain 8 decimals character"
if re.search(r"^([0-9]{8})$", value) is not None:
if len(value) == 8 and value.isdigit():
step = 4
err_desc = "First 3 character should be less than 128"
result_128 = int(value[0:3]) < 128
Expand Down
Loading