making SPI CS optional (#988)

* making SPI CS optional

* CS pin should be declared as optional or required in CONFIG_SCHEMA

* changed SPI_DEVICE_SCHEMA to a function, like i2c

* added spi_device_schema() to pcd8544, lint fixes

* updated max31856 with new spi_device_schema()

* cleanup imports

Co-authored-by: Ilya Goldberg <iggie@mac.com>
This commit is contained in:
igg
2020-06-10 13:03:11 -07:00
committed by GitHub
parent bab562dc3a
commit 821c1a8bbd
17 changed files with 67 additions and 43 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ CONFIG_SCHEMA = cv.Schema({
cv.Optional(CONF_ON_TAG): automation.validate_automation({
cv.GenerateID(CONF_TRIGGER_ID): cv.declare_id(PN532Trigger),
}),
}).extend(cv.polling_component_schema('1s')).extend(spi.SPI_DEVICE_SCHEMA)
}).extend(cv.polling_component_schema('1s')).extend(spi.spi_device_schema())
def to_code(config):