mirror of
https://github.com/acon96/home-llm.git
synced 2026-01-08 21:28:05 -05:00
Fix Home LLM v1-v3 service call processing (#206)
This commit is contained in:
committed by
GitHub
parent
e1284324cd
commit
1ccbe62d3c
@@ -314,7 +314,7 @@ class LocalLLMAgent(ConversationEntity, AbstractConversationAgent):
|
||||
service_call_regex = self.entry.options.get(CONF_SERVICE_CALL_REGEX, DEFAULT_SERVICE_CALL_REGEX)
|
||||
|
||||
try:
|
||||
service_call_pattern = re.compile(service_call_regex)
|
||||
service_call_pattern = re.compile(service_call_regex, flags=re.MULTILINE)
|
||||
except Exception as err:
|
||||
_LOGGER.exception("There was a problem compiling the service call regex")
|
||||
|
||||
@@ -431,9 +431,9 @@ class LocalLLMAgent(ConversationEntity, AbstractConversationAgent):
|
||||
vol.Required('service'): str,
|
||||
vol.Required('target_device'): str,
|
||||
vol.Optional('rgb_color'): str,
|
||||
vol.Optional('brightness'): float,
|
||||
vol.Optional('temperature'): float,
|
||||
vol.Optional('humidity'): float,
|
||||
vol.Optional('brightness'): vol.Coerce(float),
|
||||
vol.Optional('temperature'): vol.Coerce(float),
|
||||
vol.Optional('humidity'): vol.Coerce(float),
|
||||
vol.Optional('fan_mode'): str,
|
||||
vol.Optional('hvac_mode'): str,
|
||||
vol.Optional('preset_mode'): str,
|
||||
|
||||
Reference in New Issue
Block a user