File tree 2 files changed +6
-2
lines changed
custom_components/multiscrape
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 48
48
49
49
SCRAPER_DATA = "scraper"
50
50
51
- METHODS = ["POST" , "GET" , "post" , "get " ]
51
+ METHODS = ["POST" , "GET" , "PUT " ]
52
52
DEFAULT_SEPARATOR = ","
53
53
54
54
LOG_ERROR = "error"
Original file line number Diff line number Diff line change 50
50
),
51
51
vol .Optional (CONF_HEADERS ): vol .Schema ({cv .string : cv .template }),
52
52
vol .Optional (CONF_PARAMS ): vol .Schema ({cv .string : cv .template }),
53
- vol .Optional (CONF_METHOD , default = DEFAULT_METHOD ): vol .In (METHODS ),
53
+ vol .Optional (CONF_METHOD , default = DEFAULT_METHOD ): vol .All (
54
+ cv .string , # Ensure it's a string
55
+ lambda method : method .lower (), # Convert to lowercase
56
+ vol .In ([m .lower () for m in METHODS ]) # Validate against lowercase methods
57
+ ),
54
58
vol .Optional (CONF_USERNAME ): cv .string ,
55
59
vol .Optional (CONF_PASSWORD ): cv .string ,
56
60
vol .Optional (CONF_PAYLOAD ): cv .template ,
You can’t perform that action at this time.
0 commit comments